fallback for unexpected null input type

This commit is contained in:
Michael Genson 2025-06-17 22:54:48 +00:00
commit 28ff97343c

View file

@ -95,7 +95,11 @@ export default defineNuxtComponent({
const itemVal = computed({
get: () => {
try {
return Object.keys(props.modelValue).length !== 0 ? props.modelValue : null;
} catch {
return null;
}
},
set: (val) => {
itemIdVal.value = val?.id || undefined;