Parcourir la source

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

Herbert Vojčík il y a 9 ans
Parent
commit
47324bb572
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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);
                 });
             }
         }