Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on reseting form object #3468

Closed
5 tasks done
Safirion opened this issue Aug 31, 2021 · 1 comment
Closed
5 tasks done

Crash on reseting form object #3468

Safirion opened this issue Aug 31, 2021 · 1 comment
Labels
🐛 bug Unintended behavior

Comments

@Safirion
Copy link

Safirion commented Aug 31, 2021

What happened?

VeeValidate crash when I reset the object linked to the form fields via v-model

Reproduction steps

1.Create a form with one field or more and link a field to an object props : v-model="formObject.email"
2.Write somthing in the field
3.Reset the form object like that : formObject = {}

Version

Vue.js 3.x and vee-validate 4.x

What browsers are you seeing the problem on?

  • Firefox
  • Chrome
  • Safari
  • Microsoft Edge

Relevant log output

runtime-dom.esm-bundler.js:226 Uncaught (in promise) TypeError: Cannot convert a Symbol value to a string
    at patchDOMProp (runtime-dom.esm-bundler.js:226)
    at patchProp (runtime-dom.esm-bundler.js:387)
    at patchProps (runtime-core.esm-bundler.js:4334)
    at patchElement (runtime-core.esm-bundler.js:4267)
    at processElement (runtime-core.esm-bundler.js:4075)
    at patch (runtime-core.esm-bundler.js:3992)
    at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js:4608)
    at ReactiveEffect.run (reactivity.esm-bundler.js:160)
    at updateComponent (runtime-core.esm-bundler.js:4472)
    at processComponent (runtime-core.esm-bundler.js:4405)
patchDOMProp @ runtime-dom.esm-bundler.js:226
patchProp @ runtime-dom.esm-bundler.js:387
patchProps @ runtime-core.esm-bundler.js:4334
patchElement @ runtime-core.esm-bundler.js:4267
processElement @ runtime-core.esm-bundler.js:4075
patch @ runtime-core.esm-bundler.js:3992
componentUpdateFn @ runtime-core.esm-bundler.js:4608
run @ reactivity.esm-bundler.js:160
updateComponent @ runtime-core.esm-bundler.js:4472
processComponent @ runtime-core.esm-bundler.js:4405
patch @ runtime-core.esm-bundler.js:3995
patchKeyedChildren @ runtime-core.esm-bundler.js:4763
patchChildren @ runtime-core.esm-bundler.js:4706
patchElement @ runtime-core.esm-bundler.js:4278
processElement @ runtime-core.esm-bundler.js:4075
patch @ runtime-core.esm-bundler.js:3992
patchKeyedChildren @ runtime-core.esm-bundler.js:4763
patchChildren @ runtime-core.esm-bundler.js:4706
patchElement @ runtime-core.esm-bundler.js:4278
processElement @ runtime-core.esm-bundler.js:4075
patch @ runtime-core.esm-bundler.js:3992
componentUpdateFn @ runtime-core.esm-bundler.js:4608
run @ reactivity.esm-bundler.js:160
callWithErrorHandling @ runtime-core.esm-bundler.js:6988
flushJobs @ runtime-core.esm-bundler.js:7219
Promise.then (async)
queueFlush @ runtime-core.esm-bundler.js:7118
queueJob @ runtime-core.esm-bundler.js:7112
(anonymous) @ runtime-core.esm-bundler.js:4640
triggerEffects @ reactivity.esm-bundler.js:358
trigger @ reactivity.esm-bundler.js:328
set @ reactivity.esm-bundler.js:475
set @ runtime-core.esm-bundler.js:6328
reset @ WorksiteChargeList.vue:126
Object.onClick._cache.<computed>._cache.<computed> @ WorksiteChargeList.vue:77
callWithErrorHandling @ runtime-core.esm-bundler.js:6988
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:6997
invoker @ runtime-dom.esm-bundler.js:347
runtime-core.esm-bundler.js:961


 Uncaught (in promise) TypeError: Cannot read property 'emitsOptions' of null
    at shouldUpdateComponent (runtime-core.esm-bundler.js:961)
    at updateComponent (runtime-core.esm-bundler.js:4451)
    at processComponent (runtime-core.esm-bundler.js:4405)
    at patch (runtime-core.esm-bundler.js:3995)
    at patchKeyedChildren (runtime-core.esm-bundler.js:4763)
    at patchChildren (runtime-core.esm-bundler.js:4706)
    at patchElement (runtime-core.esm-bundler.js:4278)
    at processElement (runtime-core.esm-bundler.js:4075)
    at patch (runtime-core.esm-bundler.js:3992)
    at patchKeyedChildren (runtime-core.esm-bundler.js:4763)
shouldUpdateComponent @ runtime-core.esm-bundler.js:961
updateComponent @ runtime-core.esm-bundler.js:4451
processComponent @ runtime-core.esm-bundler.js:4405
patch @ runtime-core.esm-bundler.js:3995
patchKeyedChildren @ runtime-core.esm-bundler.js:4763
patchChildren @ runtime-core.esm-bundler.js:4706
patchElement @ runtime-core.esm-bundler.js:4278
processElement @ runtime-core.esm-bundler.js:4075
patch @ runtime-core.esm-bundler.js:3992
patchKeyedChildren @ runtime-core.esm-bundler.js:4763
patchChildren @ runtime-core.esm-bundler.js:4706
patchElement @ runtime-core.esm-bundler.js:4278
processElement @ runtime-core.esm-bundler.js:4075
patch @ runtime-core.esm-bundler.js:3992
componentUpdateFn @ runtime-core.esm-bundler.js:4608
run @ reactivity.esm-bundler.js:160
callWithErrorHandling @ runtime-core.esm-bundler.js:6988
flushJobs @ runtime-core.esm-bundler.js:7219
Promise.then (async)
queueFlush @ runtime-core.esm-bundler.js:7118
queueJob @ runtime-core.esm-bundler.js:7112
(anonymous) @ runtime-core.esm-bundler.js:4640
triggerEffects @ reactivity.esm-bundler.js:358
triggerRefValue @ reactivity.esm-bundler.js:948
(anonymous) @ reactivity.esm-bundler.js:1077
triggerEffects @ reactivity.esm-bundler.js:358
trigger @ reactivity.esm-bundler.js:328
set @ reactivity.esm-bundler.js:475
setFieldErrorBag @ vee-validate.esm.js:1855
setErrors @ vee-validate.esm.js:1104
setValidationState @ vee-validate.esm.js:995
validateWithStateMutation @ vee-validate.esm.js:806
async function (async)
validateWithStateMutation @ vee-validate.esm.js:804
(anonymous) @ vee-validate.esm.js:1239
callWithErrorHandling @ runtime-core.esm-bundler.js:6988
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:6997
job @ runtime-core.esm-bundler.js:7380
flushPreFlushCbs @ runtime-core.esm-bundler.js:7161
updateComponentPreRender @ runtime-core.esm-bundler.js:4669
componentUpdateFn @ runtime-core.esm-bundler.js:4579
run @ reactivity.esm-bundler.js:160
updateComponent @ runtime-core.esm-bundler.js:4472
processComponent @ runtime-core.esm-bundler.js:4405
patch @ runtime-core.esm-bundler.js:3995
patchKeyedChildren @ runtime-core.esm-bundler.js:4763
patchChildren @ runtime-core.esm-bundler.js:4706
patchElement @ runtime-core.esm-bundler.js:4278
processElement @ runtime-core.esm-bundler.js:4075
patch @ runtime-core.esm-bundler.js:3992
patchKeyedChildren @ runtime-core.esm-bundler.js:4763
patchChildren @ runtime-core.esm-bundler.js:4706
patchElement @ runtime-core.esm-bundler.js:4278
processElement @ runtime-core.esm-bundler.js:4075
patch @ runtime-core.esm-bundler.js:3992
componentUpdateFn @ runtime-core.esm-bundler.js:4608
run @ reactivity.esm-bundler.js:160
callWithErrorHandling @ runtime-core.esm-bundler.js:6988
flushJobs @ runtime-core.esm-bundler.js:7219
Promise.then (async)
queueFlush @ runtime-core.esm-bundler.js:7118
queueJob @ runtime-core.esm-bundler.js:7112
(anonymous) @ runtime-core.esm-bundler.js:4640
triggerEffects @ reactivity.esm-bundler.js:358
trigger @ reactivity.esm-bundler.js:328
set @ reactivity.esm-bundler.js:475
set @ runtime-core.esm-bundler.js:6328
reset @ WorksiteChargeList.vue:126
Object.onClick._cache.<computed>._cache.<computed> @ WorksiteChargeList.vue:77
callWithErrorHandling @ runtime-core.esm-bundler.js:6988
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:6997
invoker @ runtime-dom.esm-bundler.js:347
runtime-core.esm-bundler.js:961 

Uncaught (in promise) TypeError: Cannot read property 'emitsOptions' of null
    at shouldUpdateComponent (runtime-core.esm-bundler.js:961)
    at updateComponent (runtime-core.esm-bundler.js:4451)
    at processComponent (runtime-core.esm-bundler.js:4405)
    at patch (runtime-core.esm-bundler.js:3995)
    at patchKeyedChildren (runtime-core.esm-bundler.js:4763)
    at patchChildren (runtime-core.esm-bundler.js:4706)
    at patchElement (runtime-core.esm-bundler.js:4278)
    at processElement (runtime-core.esm-bundler.js:4075)
    at patch (runtime-core.esm-bundler.js:3992)
    at patchKeyedChildren (runtime-core.esm-bundler.js:4763)
shouldUpdateComponent @ runtime-core.esm-bundler.js:961
updateComponent @ runtime-core.esm-bundler.js:4451
processComponent @ runtime-core.esm-bundler.js:4405
patch @ runtime-core.esm-bundler.js:3995
patchKeyedChildren @ runtime-core.esm-bundler.js:4763
patchChildren @ runtime-core.esm-bundler.js:4706
patchElement @ runtime-core.esm-bundler.js:4278
processElement @ runtime-core.esm-bundler.js:4075
patch @ runtime-core.esm-bundler.js:3992
patchKeyedChildren @ runtime-core.esm-bundler.js:4763
patchChildren @ runtime-core.esm-bundler.js:4706
patchElement @ runtime-core.esm-bundler.js:4278
processElement @ runtime-core.esm-bundler.js:4075
patch @ runtime-core.esm-bundler.js:3992
componentUpdateFn @ runtime-core.esm-bundler.js:4608
run @ reactivity.esm-bundler.js:160
callWithErrorHandling @ runtime-core.esm-bundler.js:6988
flushJobs @ runtime-core.esm-bundler.js:7219
Promise.then (async)
queueFlush @ runtime-core.esm-bundler.js:7118
queueJob @ runtime-core.esm-bundler.js:7112
(anonymous) @ runtime-core.esm-bundler.js:4640
triggerEffects @ reactivity.esm-bundler.js:358
triggerRefValue @ reactivity.esm-bundler.js:948
set value @ reactivity.esm-bundler.js:987
submissionHandler @ vee-validate.esm.js:1637
callWithErrorHandling @ runtime-core.esm-bundler.js:6988
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:6997
invoker @ runtime-dom.esm-bundler.js:347
runtime-core.esm-bundler.js:961 

Uncaught (in promise) TypeError: Cannot read property 'emitsOptions' of null
    at shouldUpdateComponent (runtime-core.esm-bundler.js:961)
    at updateComponent (runtime-core.esm-bundler.js:4451)
    at processComponent (runtime-core.esm-bundler.js:4405)
    at patch (runtime-core.esm-bundler.js:3995)
    at patchKeyedChildren (runtime-core.esm-bundler.js:4763)
    at patchChildren (runtime-core.esm-bundler.js:4706)
    at patchElement (runtime-core.esm-bundler.js:4278)
    at processElement (runtime-core.esm-bundler.js:4075)
    at patch (runtime-core.esm-bundler.js:3992)
    at patchKeyedChildren (runtime-core.esm-bundler.js:4763)
shouldUpdateComponent @ runtime-core.esm-bundler.js:961
updateComponent @ runtime-core.esm-bundler.js:4451
processComponent @ runtime-core.esm-bundler.js:4405
patch @ runtime-core.esm-bundler.js:3995
patchKeyedChildren @ runtime-core.esm-bundler.js:4763
patchChildren @ runtime-core.esm-bundler.js:4706
patchElement @ runtime-core.esm-bundler.js:4278
processElement @ runtime-core.esm-bundler.js:4075
patch @ runtime-core.esm-bundler.js:3992
patchKeyedChildren @ runtime-core.esm-bundler.js:4763
patchChildren @ runtime-core.esm-bundler.js:4706
patchElement @ runtime-core.esm-bundler.js:4278
processElement @ runtime-core.esm-bundler.js:4075
patch @ runtime-core.esm-bundler.js:3992
componentUpdateFn @ runtime-core.esm-bundler.js:4608
run @ reactivity.esm-bundler.js:160
callWithErrorHandling @ runtime-core.esm-bundler.js:6988
flushJobs @ runtime-core.esm-bundler.js:7219
Promise.then (async)
queueFlush @ runtime-core.esm-bundler.js:7118
queueJob @ runtime-core.esm-bundler.js:7112
(anonymous) @ runtime-core.esm-bundler.js:4640
triggerEffects @ reactivity.esm-bundler.js:358
triggerRefValue @ reactivity.esm-bundler.js:948
(anonymous) @ reactivity.esm-bundler.js:1077
triggerEffects @ reactivity.esm-bundler.js:358
triggerRefValue @ reactivity.esm-bundler.js:948
(anonymous) @ reactivity.esm-bundler.js:1077
triggerEffects @ reactivity.esm-bundler.js:358
trigger @ reactivity.esm-bundler.js:328
set @ reactivity.esm-bundler.js:475
validateWithStateMutation @ vee-validate.esm.js:805
async function (async)
validateWithStateMutation @ vee-validate.esm.js:804
(anonymous) @ vee-validate.esm.js:1590
validate @ vee-validate.esm.js:1589
submissionHandler @ vee-validate.esm.js:1639
callWithErrorHandling @ runtime-core.esm-bundler.js:6988
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:6997
invoker @ runtime-dom.esm-bundler.js:347
runtime-core.esm-bundler.js:961 

Uncaught (in promise) TypeError: Cannot read property 'emitsOptions' of null
    at shouldUpdateComponent (runtime-core.esm-bundler.js:961)
    at updateComponent (runtime-core.esm-bundler.js:4451)
    at processComponent (runtime-core.esm-bundler.js:4405)
    at patch (runtime-core.esm-bundler.js:3995)
    at patchKeyedChildren (runtime-core.esm-bundler.js:4763)
    at patchChildren (runtime-core.esm-bundler.js:4706)
    at patchElement (runtime-core.esm-bundler.js:4278)
    at processElement (runtime-core.esm-bundler.js:4075)
    at patch (runtime-core.esm-bundler.js:3992)
    at patchKeyedChildren (runtime-core.esm-bundler.js:4763)
shouldUpdateComponent @ runtime-core.esm-bundler.js:961
updateComponent @ runtime-core.esm-bundler.js:4451
processComponent @ runtime-core.esm-bundler.js:4405
patch @ runtime-core.esm-bundler.js:3995
patchKeyedChildren @ runtime-core.esm-bundler.js:4763
patchChildren @ runtime-core.esm-bundler.js:4706
patchElement @ runtime-core.esm-bundler.js:4278
processElement @ runtime-core.esm-bundler.js:4075
patch @ runtime-core.esm-bundler.js:3992
patchKeyedChildren @ runtime-core.esm-bundler.js:4763
patchChildren @ runtime-core.esm-bundler.js:4706
patchElement @ runtime-core.esm-bundler.js:4278
processElement @ runtime-core.esm-bundler.js:4075
patch @ runtime-core.esm-bundler.js:3992
componentUpdateFn @ runtime-core.esm-bundler.js:4608
run @ reactivity.esm-bundler.js:160
callWithErrorHandling @ runtime-core.esm-bundler.js:6988
flushJobs @ runtime-core.esm-bundler.js:7219
Promise.then (async)
queueFlush @ runtime-core.esm-bundler.js:7118
queueJob @ runtime-core.esm-bundler.js:7112
(anonymous) @ runtime-core.esm-bundler.js:4640
triggerEffects @ reactivity.esm-bundler.js:358
triggerRefValue @ reactivity.esm-bundler.js:948
set value @ reactivity.esm-bundler.js:987
validate.then.then.isSubmitting.value @ vee-validate.esm.js:1655
Promise.then (async)
submissionHandler @ vee-validate.esm.js:1654
callWithErrorHandling @ runtime-core.esm-bundler.js:6988
callWithAsyncErrorHandling @ runtime-core.esm-bundler.js:6997
invoker @ runtime-dom.esm-bundler.js:347

Demo link

https://codesandbox.io/embed/quiet-river-vytn8?fontsize=14&hidenavigation=1&theme=dark

Code of Conduct

@logaretm logaretm added the 🐛 bug Unintended behavior label Aug 31, 2021
@logaretm
Copy link
Owner

Thanks for reporting this, this was indeed a bug and should be resolved in the next patch release.

A small tip: Doing resets like that is not recommended because you are setting all values to undefined which can be dangerous if you have nested paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants