Skip to content

Throw errors when operating on destroyed wrapper #1685

Closed
@xanf

Description

@xanf

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions