From 76cdf75fb96fb55b4a6e7a1a9edc7c9674806391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Fri, 2 Feb 2024 09:48:14 +0100 Subject: [PATCH] fix(MongoDB Node): Fix "Maximum call stack size exceeded" error on too many rows (#8530) --- packages/nodes-base/nodes/MongoDb/MongoDb.node.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/nodes-base/nodes/MongoDb/MongoDb.node.ts b/packages/nodes-base/nodes/MongoDb/MongoDb.node.ts index f506b26d55..89e5e1ef0a 100644 --- a/packages/nodes-base/nodes/MongoDb/MongoDb.node.ts +++ b/packages/nodes-base/nodes/MongoDb/MongoDb.node.ts @@ -108,7 +108,6 @@ export class MongoDb implements INodeType { const mdb = client.db(database); - const returnItems: INodeExecutionData[] = []; let responseData: IDataObject | IDataObject[] = []; const items = this.getInputData(); @@ -369,13 +368,11 @@ export class MongoDb implements INodeType { const itemData = generatePairedItemData(items.length); - const executionData = this.helpers.constructExecutionMetaData( + const returnItems = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray(responseData), { itemData }, ); - returnItems.push(...executionData); - return [returnItems]; } }