diff --git a/src/renderer/components/dock/dock-tab.store.ts b/src/renderer/components/dock/dock-tab.store.ts index d67f1a52e7..aefc1f2b97 100644 --- a/src/renderer/components/dock/dock-tab.store.ts +++ b/src/renderer/components/dock/dock-tab.store.ts @@ -24,7 +24,7 @@ export class DockTabStore { this.storage = createStorage(storageKey, {}); await this.storage.whenReady; this.data.replace(this.storage.get()); - reaction(() => this.serializeData(), data => this.storage.set(data)); + reaction(() => this.serializeData(), (data: Record) => this.storage.set(data)); } // clear data for closed tabs @@ -39,7 +39,7 @@ export class DockTabStore { }); } - protected serializeData(): Record { + protected serializeData(): Record> { const data = this.data.toJSON(); const { storageSerializer } = this.options; @@ -68,5 +68,6 @@ export class DockTabStore { reset() { this.data.clear(); + this.storage?.clear(); } }