瀏覽代碼

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

Herbert Vojčík 9 年之前
父節點
當前提交
47324bb572
共有 1 個文件被更改,包括 1 次插入1 次删除
  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.
                 //Wait for next tick to call back the require call.
                 process.nextTick(function () {
                 process.nextTick(function () {
-                    callback.apply(null, deps);
+                    if (callback) callback.apply(null, deps);
                 });
                 });
             }
             }
         }
         }