diff options
| author | tamaina <tamaina@hotmail.co.jp> | 2021-12-26 02:24:45 +0900 |
|---|---|---|
| committer | tamaina <tamaina@hotmail.co.jp> | 2021-12-26 02:24:45 +0900 |
| commit | 2012f4a198f2071d0212af3b2feebecda24d2f37 (patch) | |
| tree | 3d9599b23df76f74b88e262b196c7e895b448804 | |
| parent | wip (diff) | |
| download | misskey-2012f4a198f2071d0212af3b2feebecda24d2f37.tar.gz misskey-2012f4a198f2071d0212af3b2feebecda24d2f37.tar.bz2 misskey-2012f4a198f2071d0212af3b2feebecda24d2f37.zip | |
wip?
| -rw-r--r-- | packages/client/src/pizzax.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/client/src/pizzax.ts b/packages/client/src/pizzax.ts index 6a876c0797..8672276fe7 100644 --- a/packages/client/src/pizzax.ts +++ b/packages/client/src/pizzax.ts @@ -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)); |