From 1367cfc70aa2a1ea03ca5c0f8b9b19d52b7aa8fd Mon Sep 17 00:00:00 2001 From: tjz <415800467@qq.com> Date: Wed, 25 Jul 2018 22:21:19 +0800 Subject: [PATCH] fix: treeSelect treeData[i].children support null #81 --- components/tree-select/index.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/tree-select/index.jsx b/components/tree-select/index.jsx index 1a00fb6a0..29f9d4e3e 100644 --- a/components/tree-select/index.jsx +++ b/components/tree-select/index.jsx @@ -58,7 +58,7 @@ export default { // label: newLabel, title: newTitle || newLabel, } - this.updateTreeData(children) + this.updateTreeData(children || []) Object.assign(list[i], item) } }, @@ -72,7 +72,7 @@ export default { dropdownClassName, ...restProps } = props - this.updateTreeData(props.treeData) + this.updateTreeData(props.treeData || []) const cls = { [`${prefixCls}-lg`]: size === 'large', [`${prefixCls}-sm`]: size === 'small',