Skip to content

Commit

Permalink
fix(query): make explain(false) disable explain for backwards compa…
Browse files Browse the repository at this point in the history
…t re: #9893
  • Loading branch information
vkarpov15 committed Feb 8, 2021
1 parent 0b6a967 commit a068e44
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -1397,9 +1397,11 @@ Query.prototype.setOptions = function(options, overwrite) {
Query.prototype.explain = function(verbose) {
if (arguments.length === 0) {
this.options.explain = true;
return this;
} else if (verbose === false) {
delete this.options.explain;
} else {
this.options.explain = verbose;
}
this.options.explain = verbose;
return this;
};

Expand Down

0 comments on commit a068e44

Please sign in to comment.