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; }