From edd311fc9154b89f6af3a3a7ad13e4399f26c0a0 Mon Sep 17 00:00:00 2001 From: Yuchao Date: Tue, 23 Apr 2024 04:28:39 +1000 Subject: [PATCH] fix(VFileInput): emit single if default is undefined & !multiple (#19656) fixes #19297 --- 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 af3434cc620..1ec00d14a64 100644 --- a/packages/vuetify/src/components/VFileInput/VFileInput.tsx +++ b/packages/vuetify/src/components/VFileInput/VFileInput.tsx @@ -67,7 +67,7 @@ export const makeVFileInputProps = propsFactory({ modelValue: { type: [Array, Object] as PropType, - default: () => ([]), + default: (props: any) => props.multiple ? [] : null, validator: (val: any) => { return wrapInArray(val).every(v => v != null && typeof v === 'object') },