Skip to content

Commit cc613c9

Browse files
committed
fix: treeSelect treeData[i].children support null #81
1 parent e6eeb7e commit cc613c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/tree-select/index.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default {
5858
// label: newLabel,
5959
title: newTitle || newLabel,
6060
}
61-
this.updateTreeData(children)
61+
this.updateTreeData(children || [])
6262
Object.assign(list[i], item)
6363
}
6464
},
@@ -72,7 +72,7 @@ export default {
7272
dropdownClassName,
7373
...restProps
7474
} = props
75-
this.updateTreeData(props.treeData)
75+
this.updateTreeData(props.treeData || [])
7676
const cls = {
7777
[`${prefixCls}-lg`]: size === 'large',
7878
[`${prefixCls}-sm`]: size === 'small',

0 commit comments

Comments
 (0)