Skip to content

Commit a6f0520

Browse files
committed
Merge pull request #243 from joshuastray/master
Fixed #4726:Fix bugs in JSB-moonwarriors
2 parents 7d55e50 + a2cdad7 commit a6f0520

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

frameworks/js-bindings/bindings/script/jsb_boot.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -586,11 +586,12 @@ cc.configuration = cc.Configuration.getInstance();
586586
cc.textureCache = cc.director.getTextureCache();
587587
cc.textureCache._addImage = cc.textureCache.addImage;
588588
cc.textureCache.addImage = function(url, cb, target) {
589-
if (cb) {
590-
target && (cb = cb.bind(target));
591-
this.addImageAsync(url, cb);
592-
}
593-
else this._addImage(url);
589+
if (cb) {
590+
target && (cb = cb.bind(target));
591+
this.addImageAsync(url, cb);
592+
}
593+
else
594+
return this._addImage(url);
594595
};
595596
cc.shaderCache = cc.ShaderCache.getInstance();
596597
cc.animationCache = cc.AnimationCache.getInstance();

0 commit comments

Comments
 (0)