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 { // 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));