From 8363a774e949f97973522baf03637e5e00316595 Mon Sep 17 00:00:00 2001 From: Ross Cruickshank Date: Mon, 16 Nov 2020 15:43:53 +0000 Subject: [PATCH] mongodb cusor handling #714 (#715) match cursor handling with parameter --- storage/mongodb/66-mongodb.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/mongodb/66-mongodb.js b/storage/mongodb/66-mongodb.js index 759da6e6..8a751640 100644 --- a/storage/mongodb/66-mongodb.js +++ b/storage/mongodb/66-mongodb.js @@ -274,13 +274,13 @@ module.exports = function(RED) { } else if (node.operation === "aggregate") { msg.payload = (Array.isArray(msg.payload)) ? msg.payload : []; - coll.aggregate(msg.payload, function(err, result) { + coll.aggregate(msg.payload, function(err, cursor) { if (err) { node.error(err); } else { cursor.toArray(function(cursorError, cursorDocs) { - console.log(cursorDocs); + //console.log(cursorDocs); if (cursorError) { node.error(cursorError); }