mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 17:41: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 => {
|
||||
return updaters.hasOwnProperty(v) && updaters[v] instanceof Function
|
||||
}
|
||||
let updated = false
|
||||
while (updatetest(get("configversion"))) {
|
||||
await updaters[get("configversion")]()
|
||||
updated = true
|
||||
}
|
||||
return updated
|
||||
}
|
||||
|
||||
/** Read all user configuration from storage API then notify any waiting asynchronous calls
|
||||
|
@ -1494,8 +1497,10 @@ async function init() {
|
|||
schlepp(localConfig[CONFIGNAME])
|
||||
}
|
||||
|
||||
await update()
|
||||
await save()
|
||||
const configUpdated = await update()
|
||||
if (configUpdated)
|
||||
await save()
|
||||
|
||||
INITIALISED = true
|
||||
for (const waiter of WAITERS) {
|
||||
waiter()
|
||||
|
|
Loading…
Add table
Reference in a new issue