From 5c1e2e5d7ae0e55d5a6c2e30d1b197abecc132c2 Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 30 Dec 2021 03:01:58 +0900 Subject: スコープの判定を厳密に (#8100) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/client/src/pizzax.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/client/src') diff --git a/packages/client/src/pizzax.ts b/packages/client/src/pizzax.ts index fc01e92ee7..dbbbfc228a 100644 --- a/packages/client/src/pizzax.ts +++ b/packages/client/src/pizzax.ts @@ -74,7 +74,7 @@ export class Storage { }, 1); // streamingのuser storage updateイベントを監視して更新 connection?.on('registryUpdated', ({ scope, key, value }: { scope: string[], key: keyof T, value: T[typeof key]['default'] }) => { - if (scope[1] !== this.key || this.state[key] === value) return; + if (scope.length !== 2 || scope[0] !== 'client' || scope[1] !== this.key || this.state[key] === value) return; this.state[key] = value; this.reactiveState[key].value = value; -- cgit v1.2.3-freya