Skip to content

Commit 3767aeb

Browse files
authored
fix(tree-select): enable value with empty array (#2173)
1 parent b623bf3 commit 3767aeb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tree-select/tree-select.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default class TreeSelect extends SuperComponent {
6666

6767
if (multiple) {
6868
const finalValue = this.data.value || this.data.defaultValue;
69-
if (!Array.isArray(finalValue[leafLevel])) {
69+
if (finalValue[leafLevel] != null && !Array.isArray(finalValue[leafLevel])) {
7070
throw TypeError('应传入数组类型的 value');
7171
}
7272
}

0 commit comments

Comments
 (0)