Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Execute Workflow Node): Assign fallback pairedItem only if not present in output item and different length of input output #9145

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions packages/nodes-base/nodes/ExecuteWorkflow/ExecuteWorkflow.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,19 @@ export class ExecuteWorkflow implements INodeType {
items,
);

const pairedItem = generatePairedItemData(items.length);
const fallbackPairedItemData = generatePairedItemData(items.length);

for (const output of workflowResult) {
for (const item of output) {
item.pairedItem = pairedItem;
const sameLength = output.length === items.length;

for (const [itemIndex, item] of output.entries()) {
if (item.pairedItem) continue;

if (sameLength) {
item.pairedItem = { item: itemIndex };
} else {
item.pairedItem = fallbackPairedItemData;
}
}
}

Expand Down
Loading