Merge pull request #1711 from pandamicro/v1.5

Avoid duplicated asset entry in loader caused by synchronous process
This commit is contained in:
Jare Guo
2017-06-07 16:46:10 +08:00
committed by GitHub
+4
View File
@@ -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);
}
}