fix: treeSelect treeData[i].children support null #81

pull/165/head
tjz 2018-07-25 22:21:19 +08:00
parent e6eeb7e02a
commit cc613c9012
1 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ export default {
// label: newLabel, // label: newLabel,
title: newTitle || newLabel, title: newTitle || newLabel,
} }
this.updateTreeData(children) this.updateTreeData(children || [])
Object.assign(list[i], item) Object.assign(list[i], item)
} }
}, },
@ -72,7 +72,7 @@ export default {
dropdownClassName, dropdownClassName,
...restProps ...restProps
} = props } = props
this.updateTreeData(props.treeData) this.updateTreeData(props.treeData || [])
const cls = { const cls = {
[`${prefixCls}-lg`]: size === 'large', [`${prefixCls}-lg`]: size === 'large',
[`${prefixCls}-sm`]: size === 'small', [`${prefixCls}-sm`]: size === 'small',