summaryrefslogtreecommitdiff
path: root/packages/client/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/client/src')
-rw-r--r--packages/client/src/pizzax.ts3
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));