Skip to content

Commit

Permalink
Merge pull request #8151 from fernandolguevara/patch-2
Browse files Browse the repository at this point in the history
fix findOneAndUpdate with { runValidators: true } options
  • Loading branch information
vkarpov15 committed Sep 12, 2019
2 parents 6e86500 + 483c90a commit 3f9c9b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/query.js
Expand Up @@ -3543,10 +3543,10 @@ Query.prototype._findAndModify = function(type, callback) {
if (error) {
return callback(error);
}
_legacyFindAndModify.call(_this, castedQuery, this._update, opts, cb);
_legacyFindAndModify.call(_this, castedQuery, _this._update, opts, cb);
});
} else {
_legacyFindAndModify.call(_this, castedQuery, this._update, opts, cb);
_legacyFindAndModify.call(_this, castedQuery, _this._update, opts, cb);
}

return this;
Expand Down

0 comments on commit 3f9c9b8

Please sign in to comment.