mirror of
https://github.com/mathuo/dockview
synced 2025-09-16 14:19:01 +00:00
Merge pull request #944 from mcdenhoed/patch-1
Emitter: only store last event if replay is active
This commit is contained in:
commit
1d85bfafa5
@ -160,7 +160,9 @@ export class Emitter<T> implements IDisposable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public fire(e: T): void {
|
public fire(e: T): void {
|
||||||
this._last = e;
|
if(this.options?.replay){
|
||||||
|
this._last = e;
|
||||||
|
}
|
||||||
for (const listener of this._listeners) {
|
for (const listener of this._listeners) {
|
||||||
listener.callback(e);
|
listener.callback(e);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user