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 {
281281 }
282282
283283 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 ;
287287 }
288288
289+ const cRS = oldChild . __ngt_renderer__ ;
290+
289291 // if parent is still falsy, we don't know what to do with the parent.
290292 // we'll just remove the child and destroy it
291- if ( ! parent ) {
293+ if ( parent == null && cRS ?. [ NgtRendererClassId . type ] !== 'three' ) {
292294 removeThreeChild ( oldChild , undefined , true ) ;
293295 this . destroyInternal ( oldChild , undefined ) ;
294296 return ;
295297 }
296298
297299 const pRS = parent . __ngt_renderer__ ;
298- const cRS = oldChild . __ngt_renderer__ ;
299300
300301 if (
301302 ( ! cRS || ! pRS ) &&
You can’t perform that action at this time.
0 commit comments