this.$$c may be undefined if element was removed from DOM right after attaching

pull/11489/head
hardl 2 years ago
parent 091912800a
commit fccccd4580

@ -335,7 +335,7 @@ if (typeof HTMLElement === 'function') {
this.$$cn = false; this.$$cn = false;
// In a microtask, because this could be a move within the DOM // In a microtask, because this could be a move within the DOM
Promise.resolve().then(() => { Promise.resolve().then(() => {
if (!this.$$cn) { if (!this.$$cn && this.$$c) {
this.$$c.$destroy(); this.$$c.$destroy();
this.$$c = undefined; this.$$c = undefined;
} }

Loading…
Cancel
Save