Skip to content

Commit

Permalink
Core: Check module type in configure
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed Oct 14, 2019
1 parent 0dc14c3 commit cf18850
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 \`configur\`"?`
);
}
if (m && m.hot && m.hot.dispose) {
({ previousExports = new Map() } = m.hot.data || {});

Expand Down

0 comments on commit cf18850

Please sign in to comment.