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

Remove argument passed to the @destroy event #283

Closed
filipsobol opened this issue Jun 26, 2024 · 0 comments · Fixed by #281
Closed

Remove argument passed to the @destroy event #283

filipsobol opened this issue Jun 26, 2024 · 0 comments · Fixed by #281
Milestone

Comments

@filipsobol
Copy link
Member

filipsobol commented Jun 26, 2024

The @destroy event has one argument, which was meant to be the editor instance. However, because this instance is removed before the event is fired, the argument is always null.

if ( this.instance ) {
this.instance.destroy();
this.instance = null;
}
// Note: By the time the editor is destroyed (promise resolved, editor#destroy fired)
// the Vue component will not be able to emit any longer. So emitting #destroy a bit earlier.
this.$emit( 'destroy', this.instance );

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

Successfully merging a pull request may close this issue.

2 participants