fix: another additional check for component

fix for #10454
pull/11488/head
Philipp Pracht 2 years ago committed by GitHub
parent 34079a0ec5
commit 84ff2c8318
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -193,7 +193,7 @@ if (typeof HTMLElement === 'function') {
this.$$cn = false;
// In a microtask, because this could be a move within the DOM
Promise.resolve().then(() => {
if (!this.$$cn) {
if (!this.$$cn && this.$$c) { // this.$$c may be undefined if element was removed from DOM right after attaching
this.$$c.$destroy();
destroy_effect(this.$$me);
this.$$c = undefined;

Loading…
Cancel
Save