Skip to content

Commit

Permalink
fix(VFileInput): trying to read index 0 of null after VForm reset()
Browse files Browse the repository at this point in the history
  • Loading branch information
kingyyy committed Jul 21, 2024
1 parent b94f2b9 commit 05e8a29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vuetify/src/components/VFileInput/VFileInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const VFileInput = genericComponent<VFileInputSlots>()({
'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)
Expand Down

0 comments on commit 05e8a29

Please # to comment.