mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 02:13:08 +02:00
fix
This commit is contained in:
parent
c1aa60bc40
commit
97696b18a6
1 changed files with 6 additions and 4 deletions
|
@ -106,10 +106,12 @@ export class Storage<T extends StateDef> {
|
||||||
this.state[key] = value;
|
this.state[key] = value;
|
||||||
this.reactiveState[key].value = value;
|
this.reactiveState[key].value = value;
|
||||||
|
|
||||||
const cache = JSON.parse(localStorage.getItem(this.keyForLocalStorage + '::cache::' + $i.id) || '{}');
|
this.addIdbSetJob(async () => {
|
||||||
if (cache[key] !== value) {
|
const cache = await get(this.registryCacheKeyName);
|
||||||
cache[key] = value;
|
if (cache[key] !== value) {
|
||||||
localStorage.setItem(this.keyForLocalStorage + '::cache::' + $i.id, JSON.stringify(cache));
|
cache[key] = value;
|
||||||
|
await set(this.registryCacheKeyName, cache);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue