From b4a7ad7a0c98202650968af9137b5d6ca156a934 Mon Sep 17 00:00:00 2001 From: Matt Broadstone Date: Fri, 19 Jul 2019 12:26:57 -0400 Subject: [PATCH] fix: return `executeOperation` for explain, if promise is desired --- lib/cursor.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/cursor.js b/lib/cursor.js index e0f64b9390..20ee26f219 100644 --- a/lib/cursor.js +++ b/lib/cursor.js @@ -1020,8 +1020,7 @@ Cursor.prototype.transformStream = function(options) { Cursor.prototype.explain = function(callback) { if (this.operation) { this.operation.options.explain = true; - executeOperation(this.s.topology, this.operation, callback); - return; + return executeOperation(this.s.topology, this.operation, callback); } this.s.cmd.explain = true;