From 05e8a2905c64bcb64f6075ad9b4270493b60fa57 Mon Sep 17 00:00:00 2001 From: Ameer Fakhri Date: Mon, 22 Jul 2024 00:16:13 +0300 Subject: [PATCH] fix(VFileInput): trying to read index 0 of null after VForm reset() fixes #20101 --- packages/vuetify/src/components/VFileInput/VFileInput.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vuetify/src/components/VFileInput/VFileInput.tsx b/packages/vuetify/src/components/VFileInput/VFileInput.tsx index 57f8bc29c2d..c097a0f1c2a 100644 --- a/packages/vuetify/src/components/VFileInput/VFileInput.tsx +++ b/packages/vuetify/src/components/VFileInput/VFileInput.tsx @@ -98,7 +98,7 @@ export const VFileInput = genericComponent()({ 'modelValue', props.modelValue, val => wrapInArray(val), - val => (props.multiple || Array.isArray(props.modelValue)) ? val : (val[0] ?? null), + val => (!props.multiple && Array.isArray(val)) ? val[0] : val, ) const { isFocused, focus, blur } = useFocus(props) const base = computed(() => typeof props.showSize !== 'boolean' ? props.showSize : undefined)