From d26d777b797ca37057154506c90f018826c6ef01 Mon Sep 17 00:00:00 2001 From: cha0s Date: Wed, 11 May 2022 15:47:32 -0500 Subject: [PATCH] fix: remove from dom --- packages/entity/src/traits/dom-node.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/entity/src/traits/dom-node.js b/packages/entity/src/traits/dom-node.js index 90f9091..8cd924b 100644 --- a/packages/entity/src/traits/dom-node.js +++ b/packages/entity/src/traits/dom-node.js @@ -68,7 +68,8 @@ export default () => class DomNode extends decorate(Trait) { } destroy() { - this.removeFromDom(); + super.parentNode?.removeChild(this.entity.node); + super.parentNode = null; this.$$styleTicker.off('tick', this.tickStyle); super.destroy(); } @@ -135,7 +136,6 @@ export default () => class DomNode extends decorate(Trait) { } removeFromDom() { - super.parentNode?.removeChild(this.entity.node); super.parentNode = null; }