diff options
| author | tamaina <tamaina@hotmail.co.jp> | 2021-12-30 03:01:58 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-30 03:01:58 +0900 |
| commit | 5c1e2e5d7ae0e55d5a6c2e30d1b197abecc132c2 (patch) | |
| tree | ccf6628ed2d0022809c55c3777492d1a31bc0224 /packages/client/src | |
| parent | Update CONTRIBUTING.md (diff) | |
| download | misskey-5c1e2e5d7ae0e55d5a6c2e30d1b197abecc132c2.tar.gz misskey-5c1e2e5d7ae0e55d5a6c2e30d1b197abecc132c2.tar.bz2 misskey-5c1e2e5d7ae0e55d5a6c2e30d1b197abecc132c2.zip | |
スコープの判定を厳密に (#8100)
Diffstat (limited to 'packages/client/src')
| -rw-r--r-- | packages/client/src/pizzax.ts | 2 |
1 files changed, 1 insertions, 1 deletions
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<T extends StateDef> { }, 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; |