diff --git a/packages/@glimmer/runtime/lib/bounds.ts b/packages/@glimmer/runtime/lib/bounds.ts index 93a936bd9..62b44257f 100644 --- a/packages/@glimmer/runtime/lib/bounds.ts +++ b/packages/@glimmer/runtime/lib/bounds.ts @@ -65,7 +65,6 @@ export function move(bounds: Bounds, reference: Nullable): Nullable< } export function clear(bounds: Bounds): Nullable { - let parent = bounds.parentElement(); let first = bounds.firstNode(); let last = bounds.lastNode(); @@ -75,7 +74,7 @@ export function clear(bounds: Bounds): Nullable { while (true) { let next = current.nextSibling; - parent.removeChild(current); + current.parentNode?.removeChild(current); if (current === last) { return next;