mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
Merge pull request #1711 from pandamicro/v1.5
Avoid duplicated asset entry in loader caused by synchronous process
This commit is contained in:
@@ -229,9 +229,13 @@ proto.appendPipe = function (pipe) {
|
||||
proto.flowIn = function (items) {
|
||||
var i, pipe = this._pipes[0], item;
|
||||
if (pipe) {
|
||||
// Cache all items first, in case synchronous loading flow same item repeatly
|
||||
for (i = 0; i < items.length; i++) {
|
||||
item = items[i];
|
||||
this._cache[item.id] = item;
|
||||
}
|
||||
for (i = 0; i < items.length; i++) {
|
||||
item = items[i];
|
||||
flow(pipe, item);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user