We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7d55e50 + a2cdad7 commit a6f0520Copy full SHA for a6f0520
frameworks/js-bindings/bindings/script/jsb_boot.js
@@ -586,11 +586,12 @@ cc.configuration = cc.Configuration.getInstance();
586
cc.textureCache = cc.director.getTextureCache();
587
cc.textureCache._addImage = cc.textureCache.addImage;
588
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);
+ if (cb) {
+ target && (cb = cb.bind(target));
+ this.addImageAsync(url, cb);
+ }
+ else
594
+ return this._addImage(url);
595
};
596
cc.shaderCache = cc.ShaderCache.getInstance();
597
cc.animationCache = cc.AnimationCache.getInstance();
0 commit comments