refactor: improve promise handling
This commit is contained in:
parent
6c253ec4cf
commit
d6771840bd
1 changed files with 4 additions and 4 deletions
|
|
@ -7,11 +7,11 @@ exports.up = function (next) {
|
|||
return loadLatest()
|
||||
.then(config => {
|
||||
return saveConfig(newConfig)
|
||||
})
|
||||
.then(next)
|
||||
.catch(err => {
|
||||
return next(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
module.exports.down = function (next) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue