Skip to content

Commit

Permalink
Revert "feat(Update): add the ability to specify a pipeline to an upd…
Browse files Browse the repository at this point in the history
…ate command (#2017)"

This reverts commit 44a4110.
  • Loading branch information
daprahamian committed Oct 16, 2019
1 parent 558d4fb commit 4cdb950
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/collection.js
Expand Up @@ -697,15 +697,7 @@ Collection.prototype.updateOne = function(filter, update, options, callback) {
if (typeof options === 'function') (callback = options), (options = {});
options = options || {};

let err;
if (Array.isArray(update)) {
for (let i = 0; !err && i < update.length; i++) {
err = checkForAtomicOperators(update[i]);
}
} else {
err = checkForAtomicOperators(update);
}

const err = checkForAtomicOperators(update);
if (err) {
if (typeof callback === 'function') return callback(err);
return this.s.promiseLibrary.reject(err);
Expand Down

0 comments on commit 4cdb950

Please sign in to comment.