future 1 год назад
Родитель
Сommit
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) {