mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
also remove deferred log items from open list when finishing them
otherwise they end up in the logs twice when exporting
This commit is contained in:
parent
6aab049052
commit
5527e2b22c
@ -159,6 +159,11 @@ export class Logger implements ILogger {
|
||||
this._openItems.clear();
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
_removeItemFromOpenList(item: LogItem): void {
|
||||
this._openItems.delete(item);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
_persistItem(item: LogItem, filter?: LogFilter, forced?: boolean): void {
|
||||
for (var i = 0; i < this.reporters.length; i += 1) {
|
||||
@ -186,6 +191,7 @@ class DeferredPersistRootLogItem extends LogItem {
|
||||
finish() {
|
||||
super.finish();
|
||||
(this._logger as Logger)._persistItem(this, undefined, false);
|
||||
(this._logger as Logger)._removeItemFromOpenList(this);
|
||||
}
|
||||
|
||||
forceFinish() {
|
||||
|
Loading…
Reference in New Issue
Block a user