Skip to content

Commit 673c6a1

Browse files
authored
add comment
1 parent bf6bd1c commit 673c6a1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/strongbus.ts

+1
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ export class Bus<TEventMap extends object = object> implements Scannable<TEventM
457457
const {token, event, handler} = this._unsubQueue.shift();
458458
if(this.subscriptionCache.has(token)) {
459459
this.subscriptionCache.delete(token);
460+
// lifecycle events may trigger additional unsubs, which will be pushed to the end of queue and handled in a subsequent iteration of this loop
460461
this.removeListener(event, handler);
461462
}
462463
}

0 commit comments

Comments
 (0)