Skip to content

Commit

Permalink
fix(TreeSelect): support defaultValue/value is null string
Browse files Browse the repository at this point in the history
  • Loading branch information
jinli.lyy committed Jan 24, 2019
1 parent 24e2a0d commit ab04292
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tree/view/util.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable valid-jsdoc */
export function normalizeToArray(keys) {
if (keys) {
if (keys !== undefined && keys !== null) {
if (Array.isArray(keys)) {
return [...keys];
}
Expand Down Expand Up @@ -70,6 +71,7 @@ export function isSiblingOrSelf(currentPos, targetPos) {
});
}

// eslint-disable-next-line max-statements
export function getAllCheckedKeys(checkedKeys, _k2n, _p2n) {
checkedKeys = normalizeToArray(checkedKeys);
const filteredKeys = checkedKeys.filter(key => !!_k2n[key]);
Expand Down

0 comments on commit ab04292

Please sign in to comment.