Skip to content

Commit

Permalink
Merge pull request #8412 from storybookjs/7935-configure-module-check
Browse files Browse the repository at this point in the history
Core: Check module type in configure
  • Loading branch information
shilman authored Oct 18, 2019
2 parents d813f52 + cce0d28 commit 9fba946
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/core/src/client/preview/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,11 @@ export default function start(render, { decorateStory } = {}) {
* @param {*} framework - name of framework in use, e.g. "react"
*/
const configure = (loadable, m, framework) => {
if (typeof m === 'string') {
throw new Error(
`Invalid module '${m}'. Did you forget to pass \`module\` as the second argument to \`configure\`"?`
);
}
if (m && m.hot && m.hot.dispose) {
({ previousExports = new Map() } = m.hot.data || {});

Expand Down

1 comment on commit 9fba946

@vercel
Copy link

@vercel vercel bot commented on 9fba946 Oct 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.