Skip to content

Commit

Permalink
fix #180
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Oct 13, 2015
1 parent 754db47 commit 5246521
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ SkinCollection.prototype.updateById = function (id, doc, callback) {
var _this = this;
if (callback) {
callback = function(error, res) {
oldCb.call(_this, error, res.result);
oldCb.call(_this, error, !!res ? res.result : null);
};
}
return this._operateById('update', id, [id, doc, callback]);
Expand All @@ -173,7 +173,7 @@ SkinCollection.prototype.removeById = function (id, callback) {
var _this = this;
if (callback) {
callback = function(error, res) {
oldCb.call(_this, error, res.result.n);
oldCb.call(_this, error, !!res ? res.result.n : null);
};
}
return this._operateById('remove', id, [id, callback]);
Expand Down

0 comments on commit 5246521

Please sign in to comment.