From 0fcfb359d2c719673b6ebbf1a93d64d5260cc702 Mon Sep 17 00:00:00 2001 From: XiaoFeng Date: Wed, 6 Jan 2016 20:42:27 +0800 Subject: [PATCH] Fix more js parser font setting error --- .../script/studio/parsers/timelineParser-2.x.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cocos/scripting/js-bindings/script/studio/parsers/timelineParser-2.x.js b/cocos/scripting/js-bindings/script/studio/parsers/timelineParser-2.x.js index a72d1f84ff..3d1a4260bf 100644 --- a/cocos/scripting/js-bindings/script/studio/parsers/timelineParser-2.x.js +++ b/cocos/scripting/js-bindings/script/studio/parsers/timelineParser-2.x.js @@ -565,7 +565,7 @@ widget.setFontSize(fontSize); var fontName = json["FontName"]; - if(fontName != null) + if(fontName && "" !== fontName) widget.setFontName(fontName); var areaWidth = json["AreaWidth"]; @@ -601,7 +601,7 @@ if(fontResource != null){ var path = fontResource["Path"]; //resoutceType = fontResource["Type"]; - if(path != null){ + if(path){ if (cc.sys.isNative) { fontName = cc.path.join(cc.loader.resPath, resourcePath, path); } else { @@ -1133,7 +1133,7 @@ widget.setFontSize(fontSize); var fontName = json["FontName"]; - if(fontName != null) + if(fontName && "" !== fontName) widget.setFontName(fontName); var maxLengthEnabled = json["MaxLengthEnable"]; @@ -1154,7 +1154,7 @@ if(fontResource != null){ var path = fontResource["Path"]; //resoutceType = fontResource["Type"]; - if(path != null){ + if(path){ if (cc.sys.isNative) { fontName = cc.path.join(cc.loader.resPath, resourcePath, path); } else {