Subscribe on changes!

Throwing an error in a component's render function duplicates sibling elements/components

avatar
Apr 1st 2021

Version

3.0.10

Reproduction link

https://jsfiddle.net/6hgxcnm8/2/

Steps to reproduce

  • click the button Foo

What is expected?

Number to the right of the button Foo should increment.

What is actually happening?

All elements get duplicated. All Bar buttons now increment their numbers separately.


Also happens when created throws an error. Only happens when rendering of the erroring component is NOT delayed (for example by an v-if="foo"). Perhaps related to #3524?

avatar
Apr 1st 2021

Same: you should either fix the error (errors within your control), or be handling the error (errors out of your control) with app.config.errorHandler. It's best practice to always configure app.config.errorHandler if you think your app may throw unknown errors in production.