mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 12:57:29 -08:00
fix(MongoDB Node): Fix "Maximum call stack size exceeded" error on too many rows (#8530)
This commit is contained in:
parent
d4607381ed
commit
76cdf75fb9
|
@ -108,7 +108,6 @@ export class MongoDb implements INodeType {
|
||||||
|
|
||||||
const mdb = client.db(database);
|
const mdb = client.db(database);
|
||||||
|
|
||||||
const returnItems: INodeExecutionData[] = [];
|
|
||||||
let responseData: IDataObject | IDataObject[] = [];
|
let responseData: IDataObject | IDataObject[] = [];
|
||||||
|
|
||||||
const items = this.getInputData();
|
const items = this.getInputData();
|
||||||
|
@ -369,13 +368,11 @@ export class MongoDb implements INodeType {
|
||||||
|
|
||||||
const itemData = generatePairedItemData(items.length);
|
const itemData = generatePairedItemData(items.length);
|
||||||
|
|
||||||
const executionData = this.helpers.constructExecutionMetaData(
|
const returnItems = this.helpers.constructExecutionMetaData(
|
||||||
this.helpers.returnJsonArray(responseData),
|
this.helpers.returnJsonArray(responseData),
|
||||||
{ itemData },
|
{ itemData },
|
||||||
);
|
);
|
||||||
|
|
||||||
returnItems.push(...executionData);
|
|
||||||
|
|
||||||
return [returnItems];
|
return [returnItems];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue