From 2012f4a198f2071d0212af3b2feebecda24d2f37 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sun, 26 Dec 2021 02:24:45 +0900 Subject: [PATCH] wip? --- packages/client/src/pizzax.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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));