Skip to content

Commit 554dc48

Browse files
committed
fix(core): assign attach directly on instance state
1 parent 493fd67 commit 554dc48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libs/core/src/lib/renderer/renderer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export class NgtRenderer2 implements Renderer2 {
159159

160160
const threeName = kebabToPascal(name.startsWith('ngt-') ? name.slice(4) : name);
161161
const threeTarget = this.catalogue[threeName];
162-
//
162+
163163
if (threeTarget) {
164164
const threeInstance = prepare(new threeTarget(...injectedArgs), name);
165165
const rendererNode = createRendererNode('three', threeInstance, this.document);
@@ -168,7 +168,7 @@ export class NgtRenderer2 implements Renderer2 {
168168

169169
// auto-attach for geometry and material
170170
if (is.three<THREE.BufferGeometry>(threeInstance, 'isBufferGeometry')) {
171-
Object.assign(instanceState, { attach: ['geometry'] });
171+
instanceState.attach = ['geometry'];
172172
} else if (is.three<THREE.Material>(threeInstance, 'isMaterial')) {
173173
instanceState.attach = ['material'];
174174
}

0 commit comments

Comments
 (0)