Skip to content

Commit

Permalink
fix(SearchSelect): 修复 value 不存在下拉列表中会报错问题 (#565) (#569)
Browse files Browse the repository at this point in the history
  • Loading branch information
nullptr-z authored Feb 28, 2022
1 parent 1e8243a commit f45d328
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-search-select/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export default function SearchSelect(props: SearchSelectProps) {
}
} else {
if (Array.isArray(changeValue)) {
opts = changeValue.map((v) => getSelectOption(option, v as ValueType)!);
opts = changeValue.map((v) => getSelectOption(option, v as ValueType)!).filter((m) => !!m);
} else {
const findResult = getSelectOption(option, changeValue as ValueType);
if (findResult) {
Expand Down

0 comments on commit f45d328

Please sign in to comment.