1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-02 08:48:11 +09:00
This commit is contained in:
tamaina 2021-12-26 02:24:45 +09:00
parent d77fa3bb08
commit 2012f4a198

View File

@ -74,8 +74,9 @@ export class Storage<T extends StateDef> {
// streamingのuser storage updateイベントを監視して更新
this.connection.on('registryUpdated', ({ scope, key, value }) => {
this.state[key] = value;
this.state[key] = value as typeof this.state[key]['default'];
this.reactiveState[key].value = value;
const cache = JSON.parse(localStorage.getItem(this.keyForLocalStorage + '::cache::' + $i.id) || '{}');
cache[key] = value;
localStorage.setItem(this.keyForLocalStorage + '::cache::' + $i.id, JSON.stringify(cache));