We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf6bd1c commit 673c6a1Copy full SHA for 673c6a1
src/strongbus.ts
@@ -457,6 +457,7 @@ export class Bus<TEventMap extends object = object> implements Scannable<TEventM
457
const {token, event, handler} = this._unsubQueue.shift();
458
if(this.subscriptionCache.has(token)) {
459
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
461
this.removeListener(event, handler);
462
}
463
0 commit comments