mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(Merge Node): Fix possible stack overflow (#19101)
This commit is contained in:
@@ -125,7 +125,7 @@ async function executeSelectWithMappedPairedItems(
|
||||
|
||||
for (const item of result) {
|
||||
if (Array.isArray(item)) {
|
||||
returnData.push(...item.map((entry) => rowToExecutionData(entry)));
|
||||
returnData.push.apply(returnData, item.map(rowToExecutionData));
|
||||
} else if (typeof item === 'object') {
|
||||
returnData.push(rowToExecutionData(item));
|
||||
}
|
||||
@@ -211,7 +211,7 @@ export async function execute(
|
||||
input: i,
|
||||
};
|
||||
});
|
||||
pairedItem.push(...pairedItems);
|
||||
pairedItem.push.apply(pairedItem, pairedItems);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -237,7 +237,10 @@ export async function execute(
|
||||
|
||||
for (const item of result) {
|
||||
if (Array.isArray(item)) {
|
||||
returnData.push(...item.map((json) => ({ json, pairedItem })));
|
||||
returnData.push.apply(
|
||||
returnData,
|
||||
item.map((json) => ({ json, pairedItem })),
|
||||
);
|
||||
} else if (typeof item === 'object') {
|
||||
returnData.push({ json: item, pairedItem });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user