mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 09:32:38 +08:00
Fix load null resources issue in cc.loader (#3141)
This commit is contained in:
committed by
pandamicro
parent
410f9cf77b
commit
94bd9a7bd3
@@ -230,8 +230,12 @@ proto.load = function(resources, progressCallback, completeCallback) {
|
||||
var singleRes = false;
|
||||
var res;
|
||||
if (!(resources instanceof Array)) {
|
||||
singleRes = true;
|
||||
resources = resources ? [resources] : [];
|
||||
if (resources) {
|
||||
singleRes = true;
|
||||
resources = [resources];
|
||||
} else {
|
||||
resources = [];
|
||||
}
|
||||
}
|
||||
|
||||
_sharedResources.length = 0;
|
||||
|
||||
Reference in New Issue
Block a user