Skip to content

Commit 5eff54a

Browse files
committed
fix(core): use optional chaining for localState parent since it can be null
1 parent 1bd53c2 commit 5eff54a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: libs/core/src/lib/renderer/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ export class NgtRenderer implements Renderer2 {
282282

283283
removeChild(parent: NgtRendererNode | null, oldChild: NgtRendererNode, isHostElement?: boolean | undefined): void {
284284
if (parent == null) {
285-
parent = (untracked(() => getLocalState(oldChild)?.parent()) ||
285+
parent = (untracked(() => getLocalState(oldChild)?.parent?.()) ||
286286
oldChild.__ngt_renderer__[NgtRendererClassId.parent]) as NgtRendererNode;
287287
}
288288

0 commit comments

Comments
 (0)