Skip to content

Commit

Permalink
maintain compatibility with findAndModify
Browse files Browse the repository at this point in the history
  • Loading branch information
John-Weak committed Jan 16, 2025
1 parent 08b54a1 commit fa65e58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/pluginManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -2682,7 +2682,7 @@ var pluginManager = function pluginManager() {
}
logDbRead.d(name + " " + collection + " %j %j" + at, query, options);
logDbRead.d("From connection %j", countlyDb._cly_debug);
if (name === "findOneAndDelete") {
if (name === "findOneAndDelete" && !options.remove) {
return handlePromiseErrors(this["_" + name](query, options).then(result => ({ value: result })),
e, copyArguments(arguments, name), logForReads(callback, e, copyArguments(arguments, name))
);
Expand Down

0 comments on commit fa65e58

Please sign in to comment.