diff --git a/packages/@hec.js/ui/lib/src/component.js b/packages/@hec.js/ui/lib/src/component.js index 82385fe..abfd7f4 100644 --- a/packages/@hec.js/ui/lib/src/component.js +++ b/packages/@hec.js/ui/lib/src/component.js @@ -113,7 +113,7 @@ export function component(name, props, fn) { } if (this.shadowRoot) { - while (this.shadowRoot.childNodes) { + while (this.shadowRoot.childNodes.length) { this.shadowRoot.lastChild.remove(); } }