Skip to content

Commit f424b87

Browse files
authored
Fix error message to better show syntax and usage
1 parent 7a22b63 commit f424b87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dist/client/preview/render.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var _taggedTemplateLiteral2 = require('babel-runtime/helpers/taggedTemplateLiter
88

99
var _taggedTemplateLiteral3 = _interopRequireDefault(_taggedTemplateLiteral2);
1010

11-
var _templateObject = (0, _taggedTemplateLiteral3.default)(['\n Did you forget to return the React element from the story?\n Maybe check you are using "() => {<MyComp>}" instead of "() => (<MyComp>)" when defining the story.\n '], ['\n Did you forget to return the React element from the story?\n Maybe check you are using "() => {<MyComp>}" instead of "() => (<MyComp>)" when defining the story.\n ']),
11+
var _templateObject = (0, _taggedTemplateLiteral3.default)(['\n Did you forget to return the React element from the story?\n Maybe check you are using "() => {<MyComp>}" instead of "() => (<MyComp>)" when defining the story.\n '], ['\n Did you forget to return the React element from the story?\n Use "() => (<MyComp/>)" or "() => { return <MyComp/>; }" when defining the story.\n ']),
1212
_templateObject2 = (0, _taggedTemplateLiteral3.default)(['\n Seems like you are not returning a correct React element form the story.\n Could you double check that?\n '], ['\n Seems like you are not returning a correct React element form the story.\n Could you double check that?\n ']); /* global document */
1313

1414
exports.renderError = renderError;
@@ -142,4 +142,4 @@ function renderPreview(_ref) {
142142
} catch (ex) {
143143
return renderException(ex);
144144
}
145-
}
145+
}

0 commit comments

Comments
 (0)