fix: prevent account query from returning null
This commit is contained in:
parent
bd062c0f9f
commit
0aae7ac1ff
1 changed files with 1 additions and 1 deletions
|
|
@ -25,7 +25,7 @@ function loadAccounts () {
|
||||||
limit 1`
|
limit 1`
|
||||||
|
|
||||||
return db.oneOrNone(sql, ['accounts', NEW_SETTINGS_LOADER_SCHEMA_VERSION])
|
return db.oneOrNone(sql, ['accounts', NEW_SETTINGS_LOADER_SCHEMA_VERSION])
|
||||||
.then(row => row ? row.data.accounts : null)
|
.then(_.compose(_.defaultTo({}), _.get('data.accounts')))
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveConfig (config) {
|
function saveConfig (config) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue