|
|
@@ -287,9 +287,11 @@ export default {
|
|
|
if (val[0] && val[0].children.length && val[0].children.length !== 1) {
|
|
|
// 默认打开第三层
|
|
|
for (const i of val[0].children) {
|
|
|
- this.treeExpandData.push(
|
|
|
- i.children.length ? i.children[0].id : i.id
|
|
|
- )
|
|
|
+ if (i.children) {
|
|
|
+ this.treeExpandData.push(
|
|
|
+ i.children.length ? i.children[0].id : i.id
|
|
|
+ )
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|