Skip to content

Commit 03b0295

Browse files
author
Ilya Radchenko
committed
Fix upgrade helper functions error callbacks
1 parent 26293b5 commit 03b0295

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/models/upgrade/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function isNeeded(version, done) {
7070
}
7171

7272
return config.save(function() {
73-
done(null, false);
73+
done(undefined, false);
7474
});
7575
} else {
7676
config = configs[0];
@@ -93,7 +93,7 @@ function isFreshDb(cb) {
9393
if (err) return cb(err);
9494

9595
if (res === 0) {
96-
return cb(null, true);
96+
return cb(undefined, true);
9797
}
9898

9999
return cb(undefined, false);
@@ -102,10 +102,10 @@ function isFreshDb(cb) {
102102

103103
function needConfigObj(cb) {
104104
models.Config.count(function(err, res) {
105-
if (err) return err;
105+
if (err) return cb(err);
106106

107107
if (res === 0) {
108-
return cb(null, true);
108+
return cb(undefined, true);
109109
}
110110

111111
return cb(undefined, false);

0 commit comments

Comments
 (0)