From 922cdf883a90dde84e58e02ab1c7b1fbc926c25b Mon Sep 17 00:00:00 2001 From: webzhangnan Date: Tue, 6 May 2014 12:56:59 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1async=E4=B8=80?= =?UTF-8?q?=E4=B8=AAx=E6=A8=A1=E5=9D=97;=20=E5=8A=A0=E8=BD=BD=E4=BA=86[x,c?= =?UTF-8?q?];(=E6=AD=A4=E6=97=B6c=E5=B9=B6=E6=B2=A1=E6=9C=89=E5=88=86?= =?UTF-8?q?=E6=9E=90=E5=85=B6=E4=BE=9D=E8=B5=96)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mod.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mod.js b/mod.js index 1bc0a39..b20c2ea 100644 --- a/mod.js +++ b/mod.js @@ -136,15 +136,15 @@ var require, define; // // skip loading or loaded // - var dep = depArr[i]; - if (dep in factoryMap || dep in needMap) { + var dep = depArr[i]; + if (dep in needMap) { continue; } - needMap[dep] = true; - needNum++; - loadScript(dep, updateNeed, onerror); - + if(!(dep in factoryMap)){ + needNum++; + loadScript(dep, updateNeed); + } var child = resMap[dep]; if (child && 'deps' in child) { findNeed(child.deps);