1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-10-31 23:31:48 +09:00

streamingのuser storage updateイベントを監視して更新

This commit is contained in:
tamaina 2021-12-29 16:05:25 +09:00
parent f9f64a5e4c
commit 40abe3d907

View File

@ -74,7 +74,7 @@ export class Storage<T extends StateDef> {
// streamingのuser storage updateイベントを監視して更新
this.connection.on('registryUpdated', ({ scope, key, value }: { scope: string[], key: keyof T, value: T[typeof key]['default'] }) => {
if (scope[1] !== this.key) return;
if (scope[1] !== this.key || this.state[key] === value) return;
this.state[key] = value;
this.reactiveState[key].value = value;