mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(Execute Workflow Node): Assign fallback pairedItem only if not present in output item and different length of input output (#9145)
This commit is contained in:
@@ -260,11 +260,19 @@ export class ExecuteWorkflow implements INodeType {
|
|||||||
items,
|
items,
|
||||||
);
|
);
|
||||||
|
|
||||||
const pairedItem = generatePairedItemData(items.length);
|
const fallbackPairedItemData = generatePairedItemData(items.length);
|
||||||
|
|
||||||
for (const output of workflowResult) {
|
for (const output of workflowResult) {
|
||||||
for (const item of output) {
|
const sameLength = output.length === items.length;
|
||||||
item.pairedItem = pairedItem;
|
|
||||||
|
for (const [itemIndex, item] of output.entries()) {
|
||||||
|
if (item.pairedItem) continue;
|
||||||
|
|
||||||
|
if (sameLength) {
|
||||||
|
item.pairedItem = { item: itemIndex };
|
||||||
|
} else {
|
||||||
|
item.pairedItem = fallbackPairedItemData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user