Skip to content

Commit

Permalink
Add undefined module warning
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasboyt committed Sep 13, 2013
1 parent 41c9173 commit 49901bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vendor/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ define("resolver",
if (define.registry[moduleName]) {
module = requireModule(moduleName);

if (module === undefined) {
throw new Error("Module: '" + name + "' was found but returned undefined. Did you forget to `export default`?");
}

if (typeof module.create !== 'function') {
module = classFactory(module);
}
Expand Down

0 comments on commit 49901bd

Please sign in to comment.