mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
Merge pull request #461 from pandamicro/v1.0
Fix flowInDeps call complete callback multiply times
This commit is contained in:
@@ -335,12 +335,14 @@ JS.mixin(Pipeline.prototype, {
|
||||
}
|
||||
// All url completed
|
||||
callback && callback.call(this, checker);
|
||||
callback = null;
|
||||
}
|
||||
// Add loaded listeners
|
||||
for (var i = 0; i < urlList.length; ++i) {
|
||||
var url = urlList[i].id || urlList[i];
|
||||
if (typeof url !== 'string')
|
||||
if (typeof url !== 'string' || checker[url]) {
|
||||
continue;
|
||||
}
|
||||
var item = items.map[url];
|
||||
if ( !item ) {
|
||||
items.addListener(url, loadedCheck);
|
||||
@@ -354,6 +356,7 @@ JS.mixin(Pipeline.prototype, {
|
||||
// No new resources, complete directly
|
||||
if (count === 0) {
|
||||
callback && callback.call(this, checker);
|
||||
callback = null;
|
||||
}
|
||||
return this.flowIn(urlList);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user