zhangweicheng преди 4 години
родител
ревизия
91ba8d1c56
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      web/building_saas/pm/js/pm_tree.js

+ 1 - 1
web/building_saas/pm/js/pm_tree.js

@@ -332,7 +332,7 @@ const pmTree = {
                     node.children = parentMap[node.data.ID] || [];
                     node.parent = IDMap[node.data.ParentID] || this._root;
                 });
-                const roots = parentMap['-1'];
+                const roots = parentMap['-1']||[];
                 // 将各节点的children进行排序,并设置nextSibling
                 this._root.children = sortChildren(roots);
                 // 生成tree.items