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()
|
return loadLatest()
|
||||||
.then(config => {
|
.then(config => {
|
||||||
return saveConfig(newConfig)
|
return saveConfig(newConfig)
|
||||||
|
})
|
||||||
.then(next)
|
.then(next)
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
return next(err)
|
return next(err)
|
||||||
})
|
})
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports.down = function (next) {
|
module.exports.down = function (next) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue