future 1 年之前
父节点
当前提交
5405444fdd
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      assets/script/tools.ts

+ 1 - 0
assets/script/tools.ts

@@ -77,6 +77,7 @@ export class tools  {
     }
 
     public static substringRankRegionName(node:Node,string:string) {
+        if(string==undefined||string==null) { return "" }
         let lab_component = node.getComponent(Label)
         if(lab_component==null) { return }
         if(string.length>4) {