Skip to content

Commit

Permalink
Change isNaN() to Number.isNaN() and define decimal system for parseInt
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantinos Christofilos committed May 4, 2016
1 parent ff2e1b9 commit eb17ee6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cradle/database/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ Database.prototype.maxRevisions = function (revisions, callback) {
if (err) {
return callback && callback(true, null);
} else {
return callback && callback(null, parseInt(res.body));
return callback && callback(null, parseInt(res.body, 10));
}
});
} else {
this.query({
method: 'PUT',
path: '_revs_limit',
body: !isNaN(revisions) ? parseInt(revisions) : 1000
body: !Number.isNaN(revisions) ? parseInt(revisions, 10) : 1000
}, callback);
}
};
Expand Down

0 comments on commit eb17ee6

Please sign in to comment.