mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-24 03:53:08 +02:00
スコープの判定を厳密に
This commit is contained in:
parent
1b526eb573
commit
93e3aede35
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ export class Storage<T extends StateDef> {
|
||||||
}, 1);
|
}, 1);
|
||||||
// streamingのuser storage updateイベントを監視して更新
|
// streamingのuser storage updateイベントを監視して更新
|
||||||
connection?.on('registryUpdated', ({ scope, key, value }: { scope: string[], key: keyof T, value: T[typeof key]['default'] }) => {
|
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.state[key] = value;
|
||||||
this.reactiveState[key].value = value;
|
this.reactiveState[key].value = value;
|
||||||
|
|
Loading…
Reference in a new issue