Browse Source

Fix the error in case of no-cb `require(["deps"])`

Herbert Vojčík 9 years ago
parent
commit
47324bb572
1 changed files with 1 additions and 1 deletions
  1. 1 1
      amdefine.js

+ 1 - 1
amdefine.js

@@ -121,7 +121,7 @@ function amdefine(module, requireFn) {
 
                 //Wait for next tick to call back the require call.
                 process.nextTick(function () {
-                    callback.apply(null, deps);
+                    if (callback) callback.apply(null, deps);
                 });
             }
         }