File tree 1 file changed +13
-1
lines changed
libs/core/src/lib/renderer
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,19 @@ export function attachThreeChild(parent: NgtInstanceNode, child: NgtInstanceNode
68
68
const attachProp = cLS . attach ;
69
69
70
70
if ( typeof attachProp === 'function' ) {
71
- const attachCleanUp = attachProp ( parent , child , cLS . store ) ;
71
+ let attachCleanUp : ReturnType < typeof attachProp > | undefined = undefined ;
72
+
73
+ if ( cLS . isRaw ) {
74
+ if ( cLS . instanceStore . get ( 'parent' ) !== parent ) {
75
+ cLS . setParent ( parent ) ;
76
+ }
77
+ // at this point we don't have rawValue yet, so we bail and wait until the Renderer recalls attach
78
+ if ( child . __ngt_renderer__ [ NgtRendererClassId . rawValue ] === undefined ) return ;
79
+ attachCleanUp = attachProp ( parent , child . __ngt_renderer__ [ NgtRendererClassId . rawValue ] , cLS . store ) ;
80
+ } else {
81
+ attachCleanUp = attachProp ( parent , child , cLS . store ) ;
82
+ }
83
+
72
84
if ( attachCleanUp ) cLS . previousAttach = attachCleanUp ;
73
85
} else {
74
86
// we skip attach none if set explicitly
You can’t perform that action at this time.
0 commit comments