Skip to content

Commit

Permalink
fix(tree-select): enable value with empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeJim committed Jul 11, 2023
1 parent b623bf3 commit 9fc87b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tree-select/tree-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default class TreeSelect extends SuperComponent {

if (multiple) {
const finalValue = this.data.value || this.data.defaultValue;
if (!Array.isArray(finalValue[leafLevel])) {
if (finalValue[leafLevel] != null && !Array.isArray(finalValue[leafLevel])) {
throw TypeError('应传入数组类型的 value');
}
}
Expand Down

0 comments on commit 9fc87b4

Please sign in to comment.