mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-23 22:03:08 +02:00
?
This commit is contained in:
parent
2012f4a198
commit
f9f64a5e4c
1 changed files with 4 additions and 2 deletions
|
@ -73,8 +73,10 @@ export class Storage<T extends StateDef> {
|
|||
}, 1);
|
||||
|
||||
// streamingのuser storage updateイベントを監視して更新
|
||||
this.connection.on('registryUpdated', ({ scope, key, value }) => {
|
||||
this.state[key] = value as typeof this.state[key]['default'];
|
||||
this.connection.on('registryUpdated', ({ scope, key, value }: { scope: string[], key: keyof T, value: T[typeof key]['default'] }) => {
|
||||
if (scope[1] !== this.key) return;
|
||||
|
||||
this.state[key] = value;
|
||||
this.reactiveState[key].value = value;
|
||||
|
||||
const cache = JSON.parse(localStorage.getItem(this.keyForLocalStorage + '::cache::' + $i.id) || '{}');
|
||||
|
|
Loading…
Reference in a new issue