Fix endless re-rending of logs

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen committed 2022-01-10 16:54:03 +02:00
1 parent 4441d714dd
commit 48948c7286
23 files changed
+354 -161

No files matched your search

@@ -58,8 +58,9 @@ export class DockTabStore<T> {
// auto-save to local-storage
if (storageKey) {
this.storage = this.dependencies.createStorage<T>(storageKey, {});
this.storage.whenReady.then(() => {
this.data.replace(this.storage.get());
this.data.replace(this.storage.value);
reaction(() => this.toJSON(), data => this.storage.set(data));
});
}