Add ownerQueue protection to Loader (#6105)

This commit is contained in:
pandamicro
2020-01-14 20:26:07 +08:00
committed by GitHub
parent eece37c0d2
commit f3a37be03d
+1 -1
View File
@@ -391,7 +391,7 @@ export class CCLoader extends Pipeline {
if (owner) {
const ownerQueue = LoadingItems.getQueue(owner);
// Set the root ownerQueue, if no ownerQueue defined in ownerQueue, it's the root
queue._ownerQueue = ownerQueue._ownerQueue || ownerQueue;
queue._ownerQueue = (ownerQueue && ownerQueue._ownerQueue) || ownerQueue;
}
const accepted = queue.append(_sharedList, owner);
_sharedList.length = 0;