Skip to content

Commit 4cdb950

Browse files
committed
Revert "feat(Update): add the ability to specify a pipeline to an update command (#2017)"
This reverts commit 44a4110.
1 parent 558d4fb commit 4cdb950

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

lib/collection.js

+1-9
Original file line numberDiff line numberDiff line change
@@ -697,15 +697,7 @@ Collection.prototype.updateOne = function(filter, update, options, callback) {
697697
if (typeof options === 'function') (callback = options), (options = {});
698698
options = options || {};
699699

700-
let err;
701-
if (Array.isArray(update)) {
702-
for (let i = 0; !err && i < update.length; i++) {
703-
err = checkForAtomicOperators(update[i]);
704-
}
705-
} else {
706-
err = checkForAtomicOperators(update);
707-
}
708-
700+
const err = checkForAtomicOperators(update);
709701
if (err) {
710702
if (typeof callback === 'function') return callback(err);
711703
return this.s.promiseLibrary.reject(err);

0 commit comments

Comments
 (0)