Skip to content

Commit c510f65

Browse files
committed
Update build.
1 parent 974c88b commit c510f65

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

dst/index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,11 @@ var Retool = /*#__PURE__*/function (_React$Component) {
5252
_this = _super.call(this, props);
5353

5454
_defineProperty(_assertThisInitialized(_this), "startListening", function () {
55-
window.addEventListener('message', function (e) {
56-
return _this.handle(e);
57-
});
55+
if (_this.iframe) {
56+
window.addEventListener('message', function (e) {
57+
return _this.handle(e);
58+
});
59+
}
5860
});
5961

6062
_defineProperty(_assertThisInitialized(_this), "startWatchers", function () {
@@ -131,6 +133,7 @@ var Retool = /*#__PURE__*/function (_React$Component) {
131133
}
132134
});
133135

136+
if (!_this.props.url) throw new Error('Please pass a url into the Retool component.');
134137
_this.state = {
135138
url: props.url,
136139
elementWatchers: {}

dst/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-retool",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"private": false,
55
"repository": {
66
"type": "git",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"build": "react-scripts build",
3939
"test": "react-scripts test",
4040
"eject": "react-scripts eject",
41-
"publish:npm": "rm -rf dst && mkdir dst && babel src/components -d dst --copy-files && mv ./dst/Retool.js ./dst/index.js && cp ./package.json ./dst/package.json"
41+
"publish:npm": "rm -rf dst && mkdir dst && babel src/components -d dst --copy-files && mv ./dst/Retool.js ./dst/index.js && cp ./package.json ./dst/package.json && cp ./README.md ./dst/README.md"
4242
},
4343
"eslintConfig": {
4444
"extends": [

0 commit comments

Comments
 (0)