Skip to content

Commit

Permalink
fix(MongoDB Node): Fix "Maximum call stack size exceeded" error on to…
Browse files Browse the repository at this point in the history
…o many rows (#8530)
  • Loading branch information
netroy committed Feb 2, 2024
1 parent b4f10e5 commit 00f5549
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/nodes-base/nodes/MongoDb/MongoDb.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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];
}
}

0 comments on commit 00f5549

Please sign in to comment.