fix: No data returned from the query errors on migration

This commit is contained in:
siiky 2024-09-19 16:10:18 +01:00
parent bb440eedd6
commit ea9a373676
2 changed files with 2 additions and 2 deletions

View file

@ -167,7 +167,7 @@ function loadLatestConfig () {
ORDER BY id DESC
LIMIT 1`
return db.one(sql, [NEW_SETTINGS_LOADER_SCHEMA_VERSION])
return db.oneOrNone(sql, [NEW_SETTINGS_LOADER_SCHEMA_VERSION])
.then(row => row ? row.data.config : {})
.catch(err => {
throw err