Skip to content

Commit 22197d3

Browse files
Chau TranChau Tran
Chau Tran
authored and
Chau Tran
committed
fix: afterAttach and afterUpdate events are not reassigned back on node local state
1 parent badd63a commit 22197d3

File tree

1 file changed

+1
-1
lines changed
  • libs/angular-three/src/lib/renderer

1 file changed

+1
-1
lines changed

libs/angular-three/src/lib/renderer/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export function processThreeEvent(
149149

150150
if (eventName === SPECIAL_EVENTS.AFTER_UPDATE || eventName === SPECIAL_EVENTS.AFTER_ATTACH) {
151151
let emitter = lS[eventName];
152-
if (!emitter) emitter = new EventEmitter();
152+
if (!emitter) emitter = lS[eventName] = new EventEmitter();
153153
const sub = emitter.subscribe(callback);
154154
return sub!.unsubscribe.bind(sub);
155155
}

0 commit comments

Comments
 (0)