You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a case where i have to store instance of File in my form.
But when i call setValues({ file: new File() }), i get a { file: {} }, instead of { file: File }
What happened?
I have a case where i have to store instance of
File
in my form.But when i call
setValues({ file: new File() })
, i get a{ file: {} }
, instead of{ file: File }
I've found an issue in function
merge
vee-validate/packages/shared/utils.ts
Lines 26 to 41 in 16bfcf4
There should be 1 more guard for
isPlainObject
(nearisObject
guard). Here is lodash implementationhttps://github.com/lodash/lodash/blob/master/isPlainObject.js
Reproduction steps
useForm
) with initial form object like:{ file: null }
setValues
to form with non-plain object, for example instance ofnew File()
console.log
values object, instead of{ file: File }
we will found{ file: {} }
Version
Vue.js 3.x and vee-validate 4.x
What browsers are you seeing the problem on?
Relevant log output
No response
Demo link
https://stackblitz.com/edit/nuxt-starter-addc1i?file=app.vue
Code of Conduct
The text was updated successfully, but these errors were encountered: