mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 01:51:40 -05:00
Fix saving a config that did not require schema migration
This commit is contained in:
parent
b5706d9dd0
commit
442b36551a
1 changed files with 7 additions and 2 deletions
|
@ -1471,9 +1471,12 @@ export async function update() {
|
||||||
const updatetest = v => {
|
const updatetest = v => {
|
||||||
return updaters.hasOwnProperty(v) && updaters[v] instanceof Function
|
return updaters.hasOwnProperty(v) && updaters[v] instanceof Function
|
||||||
}
|
}
|
||||||
|
let updated = false
|
||||||
while (updatetest(get("configversion"))) {
|
while (updatetest(get("configversion"))) {
|
||||||
await updaters[get("configversion")]()
|
await updaters[get("configversion")]()
|
||||||
|
updated = true
|
||||||
}
|
}
|
||||||
|
return updated
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Read all user configuration from storage API then notify any waiting asynchronous calls
|
/** Read all user configuration from storage API then notify any waiting asynchronous calls
|
||||||
|
@ -1494,8 +1497,10 @@ async function init() {
|
||||||
schlepp(localConfig[CONFIGNAME])
|
schlepp(localConfig[CONFIGNAME])
|
||||||
}
|
}
|
||||||
|
|
||||||
await update()
|
const configUpdated = await update()
|
||||||
await save()
|
if (configUpdated)
|
||||||
|
await save()
|
||||||
|
|
||||||
INITIALISED = true
|
INITIALISED = true
|
||||||
for (const waiter of WAITERS) {
|
for (const waiter of WAITERS) {
|
||||||
waiter()
|
waiter()
|
||||||
|
|
Loading…
Add table
Reference in a new issue