Merge pull request #944 from mcdenhoed/patch-1

Emitter: only store last event if replay is active
This commit is contained in:
mathuo 2025-06-05 17:48:15 +01:00 committed by GitHub
commit 1d85bfafa5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -160,7 +160,9 @@ export class Emitter<T> implements IDisposable {
}
public fire(e: T): void {
this._last = e;
if(this.options?.replay){
this._last = e;
}
for (const listener of this._listeners) {
listener.callback(e);
}