simplify code

This commit is contained in:
zilongshanren
2016-11-23 11:22:33 +08:00
parent 7dde8471d9
commit baf4fbb3f3
+3 -2
View File
@@ -248,7 +248,8 @@ var RichText = cc.Class({
},
_onTTFLoaded: function () {
if(!this._getFontRawUrl()) return;
var rawUrl = this._getFontRawUrl();
if(!rawUrl) return;
var self = this;
@@ -257,7 +258,7 @@ var RichText = cc.Class({
self._updateRichText();
};
cc.CustomFontLoader.loadTTF(this._getFontRawUrl(), callback);
cc.CustomFontLoader.loadTTF(rawUrl, callback);
},
_measureText: function (styleIndex, string) {