diff --git a/lib/query.js b/lib/query.js index b115e6f17f7..21e19d205ed 100644 --- a/lib/query.js +++ b/lib/query.js @@ -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; };