mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 05:33:08 +02:00
✌️
This commit is contained in:
parent
57ee704595
commit
019529d76c
2 changed files with 4 additions and 2 deletions
|
@ -56,8 +56,8 @@ export class Storage<T extends StateDef> {
|
|||
await this.migrate();
|
||||
|
||||
const deviceState: State<T> = await get(this.deviceStateKeyName);
|
||||
const deviceAccountState = $i ? await get(this.deviceAccountStateKeyName) : {};
|
||||
const registryCache = $i ? await get(this.registryCacheKeyName) : {};
|
||||
const deviceAccountState = $i ? await get(this.deviceAccountStateKeyName) || {} : {};
|
||||
const registryCache = $i ? await get(this.registryCacheKeyName) || {} : {};
|
||||
|
||||
for (const [k, v] of Object.entries(this.def) as [keyof T, T[keyof T]][]) {
|
||||
if (v.where === 'device' && Object.prototype.hasOwnProperty.call(deviceState, k)) {
|
||||
|
|
|
@ -61,6 +61,8 @@ export const deckStore = markRaw(new Storage('deck', {
|
|||
export const loadDeck = async () => {
|
||||
let deck;
|
||||
|
||||
await deckStore.ready;
|
||||
|
||||
try {
|
||||
deck = await api('i/registry/get', {
|
||||
scope: ['client', 'deck', 'profiles'],
|
||||
|
|
Loading…
Reference in a new issue