Skip to content

Commit

Permalink
fix: fix select throws an error when the select does not match any of…
Browse files Browse the repository at this point in the history
… the options (#571)
  • Loading branch information
haoziqaq committed May 20, 2022
1 parent 9fb9d90 commit f180d93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/varlet-ui/src/select/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export default defineComponent({
option = options.find(({ label }) => label.value === modelValue)
}
return option!.label.value
return option?.label.value ?? ''
}
const computePlaceholderState = () => {
Expand Down

0 comments on commit f180d93

Please sign in to comment.