@@ -96,7 +96,7 @@ export class Tree {
// 获取顶层原始数据
getRoots(): TreeNode[] {
- return this.parentMap[this.rootID];
+ return this.parentMap[this.rootID] || [];
}
// 生成按照树结构排好序的数据