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

Throw errors when operating on destroyed wrapper #1685

Closed
xanf opened this issue Sep 13, 2020 · 2 comments
Closed

Throw errors when operating on destroyed wrapper #1685

xanf opened this issue Sep 13, 2020 · 2 comments

Comments

@xanf
Copy link
Contributor

xanf commented Sep 13, 2020

A bit related to #1342

While it is obviously impossible to "destroy" something in JavaScript it could be great help to make wrappers throw error when operating on destroyed Vue instance. I suggest making emitted (and deprecated emittedByOrder) the only exceptions, cause I can see use cases, when we want to assert instance generated certain events during destroy process.

This will help a lot when introducing enableAutoDestroy(beforeEach) in big codebases to track such hard-to-debug errors
I'm ready to submit PR for this one if team feels this one like a good addition

@afontcu
Copy link
Member

afontcu commented Sep 14, 2020

Hi! I understand why this would become useful when running enableAutoDestroy, feel free to submit the PR :)

@lmiller1990
Copy link
Member

fixed in #1706

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

No branches or pull requests

3 participants