fix: remove unnecessary ternary operation

This commit is contained in:
Liordino Neto 2020-08-10 20:57:20 -03:00 committed by Josh Harvey
parent f95deab005
commit a0f6feeb78

View file

@ -56,7 +56,7 @@ function loadLatestConfig () {
limit 1`
return db.one(sql, ['config', NEW_SETTINGS_LOADER_SCHEMA_VERSION])
.then(row => !row ? {} : row.data.config)
.then(row => row.data.config)
.catch(err => {
if (err.name === 'QueryResultError') {
throw new Error('No config was found')