浏览代码

代码强壮性处理

Tony Kang 1 年之前
父节点
当前提交
d67c671a8e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      web/building_saas/standard_interface/export/zhejiang_hangzhou.js

+ 1 - 1
web/building_saas/standard_interface/export/zhejiang_hangzhou.js

@@ -319,7 +319,7 @@ INTERFACE_EXPORT = (() => {
             }
             }
             cur = cur.parent;
             cur = cur.parent;
           }
           }
-          return (cur.data.name || '').replace(/[^0-9]/g, '');
+          return (cur?.data?.name || '').replace(/[^0-9]/g, '');
         } else {
         } else {
           const sectionCode = (node.data.name || '').replace(/[^0-9]/g, '');
           const sectionCode = (node.data.name || '').replace(/[^0-9]/g, '');
           node.data.sectionCode = sectionCode;
           node.data.sectionCode = sectionCode;