|
@@ -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
|