diff --git a/src/ui/components/FaSelect/index.vue b/src/ui/components/FaSelect/index.vue index ac6ea399..28b542c4 100644 --- a/src/ui/components/FaSelect/index.vue +++ b/src/ui/components/FaSelect/index.vue @@ -29,10 +29,10 @@ const value = defineModel() const selectedOption = computed({ get() { - return props.options.find(option => option.value === value.value) ?? props.options[0] + return props.options.length > 0 ? props.options.find(option => option.value === value.value) ?? props.options[0] : null }, set(val) { - value.value = val.value + value.value = val?.value || null }, }) @@ -40,7 +40,7 @@ const selectedOption = computed({