diff --git a/packages/vuetify/src/components/VFileInput/VFileInput.ts b/packages/vuetify/src/components/VFileInput/VFileInput.ts index ac4df41782b..8dbc6f03038 100644 --- a/packages/vuetify/src/components/VFileInput/VFileInput.ts +++ b/packages/vuetify/src/components/VFileInput/VFileInput.ts @@ -65,7 +65,7 @@ export default VTextField.extend({ default: 'file', }, value: { - default: () => [], + default: undefined, validator: val => { return typeof val === 'object' || Array.isArray(val) }, @@ -154,7 +154,7 @@ export default VTextField.extend({ methods: { clearableCallback () { - this.internalValue = this.isMultiple ? [] : null + this.internalValue = this.isMultiple ? [] : undefined this.$refs.input.value = '' }, genChips () { diff --git a/packages/vuetify/src/components/VFileInput/__tests__/VFileInput.spec.ts b/packages/vuetify/src/components/VFileInput/__tests__/VFileInput.spec.ts index 4e34fae7e36..9758e92117a 100644 --- a/packages/vuetify/src/components/VFileInput/__tests__/VFileInput.spec.ts +++ b/packages/vuetify/src/components/VFileInput/__tests__/VFileInput.spec.ts @@ -140,7 +140,7 @@ describe('VFileInput.ts', () => { }) wrapper.vm.clearableCallback() - expect(wrapper.vm.internalValue).toBeNull() + expect(wrapper.vm.internalValue).toBeUndefined() const wrapper2 = mountFunction({ attrs: { multiple: '' },