File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
libs/core/src/lib/renderer Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -281,21 +281,22 @@ export class NgtRenderer implements Renderer2 {
281
281
}
282
282
283
283
removeChild ( parent : NgtRendererNode , oldChild : NgtRendererNode , isHostElement ?: boolean | undefined ) : void {
284
- if ( parent === null ) {
285
- parent = ( oldChild . __ngt_renderer__ [ NgtRendererClassId . parent ] ||
286
- untracked ( ( ) => getLocalState ( oldChild ) ?. parent ) ) as NgtRendererNode ;
284
+ if ( parent == null ) {
285
+ parent = ( untracked ( ( ) => getLocalState ( oldChild ) ?. parent ) ||
286
+ oldChild . __ngt_renderer__ [ NgtRendererClassId . parent ] ) as NgtRendererNode ;
287
287
}
288
288
289
+ const cRS = oldChild . __ngt_renderer__ ;
290
+
289
291
// if parent is still falsy, we don't know what to do with the parent.
290
292
// we'll just remove the child and destroy it
291
- if ( ! parent ) {
293
+ if ( parent == null && cRS ?. [ NgtRendererClassId . type ] !== 'three' ) {
292
294
removeThreeChild ( oldChild , undefined , true ) ;
293
295
this . destroyInternal ( oldChild , undefined ) ;
294
296
return ;
295
297
}
296
298
297
299
const pRS = parent . __ngt_renderer__ ;
298
- const cRS = oldChild . __ngt_renderer__ ;
299
300
300
301
if (
301
302
( ! cRS || ! pRS ) &&
You can’t perform that action at this time.
0 commit comments