mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-21 17:41:28 -08:00
fix waitUntil failing with arrays and objects (#1028)
This commit is contained in:
1 parent
37de960c1b
commit
ec2909406b
1 file changed
+8
-4
@@ -103,8 +103,10 @@ export function useConfigProvider(): ConfigContext {
|
||||
const newConfig: Partial<Config> = JSON.parse(
|
||||
(await store.get('config.json')) ?? '{}'
|
||||
);
|
||||
return Object.entries(config).every(
|
||||
([key, value]) => newConfig[key as keyof Config] === value
|
||||
return Object.entries(config).every(([key, value]) =>
|
||||
typeof value === 'object'
|
||||
? JSON.stringify(newConfig[key as keyof Config]) === JSON.stringify(value)
|
||||
: newConfig[key as keyof Config] === value
|
||||
);
|
||||
},
|
||||
100,
|
||||
@@ -116,8 +118,10 @@ export function useConfigProvider(): ConfigContext {
|
||||
const newConfig: Partial<Config> = JSON.parse(
|
||||
localStorage.getItem('config.json') ?? '{}'
|
||||
);
|
||||
return Object.entries(config).every(
|
||||
([key, value]) => newConfig[key as keyof Config] === value
|
||||
return Object.entries(config).every(([key, value]) =>
|
||||
typeof value === 'object'
|
||||
? JSON.stringify(newConfig[key as keyof Config]) === JSON.stringify(value)
|
||||
: newConfig[key as keyof Config] === value
|
||||
);
|
||||
},
|
||||
100,
|
||||
|
||||
Reference in new issue
Block a user