Fix load null resources issue in cc.loader (#3141)

This commit is contained in:
yongminghuang
2018-08-24 11:03:22 +08:00
committed by pandamicro
parent 410f9cf77b
commit 94bd9a7bd3
+6 -2
View File
@@ -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;