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(core): Fix missing successful items on continueErrorOutput with multiple outputs #10218

7 changes: 4 additions & 3 deletions packages/core/src/WorkflowExecute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,6 @@ export class WorkflowExecute {
);

const errorItems: INodeExecutionData[] = [];
const successItems: INodeExecutionData[] = [];
const closeFunctions: CloseFunction[] = [];
// Create a WorkflowDataProxy instance that we can get the data of the
// item which did error
Expand All @@ -1150,8 +1149,10 @@ export class WorkflowExecute {
outputIndex < mainOutputTypes.length - 1;
outputIndex++
) {
successItems.length = 0;
const items = nodeSuccessData.length ? nodeSuccessData[0] : [];
const successItems: INodeExecutionData[] = [];
const items = nodeSuccessData[outputIndex]?.length
? nodeSuccessData[outputIndex]
: [];

while (items.length) {
const item = items.pop();
Expand Down
5 changes: 4 additions & 1 deletion packages/core/test/WorkflowExecute.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ describe('WorkflowExecute', () => {
if (nodeData.data === undefined) {
return null;
}
return nodeData.data.main[0]!.map((entry) => entry.json);
const toMap = testData.output.testAllOutputs
? nodeData.data.main
: [nodeData.data.main[0]!];
return toMap.map((data) => data!.map((entry) => entry.json));
});

// expect(resultData).toEqual(testData.output.nodeData[nodeName]);
Expand Down
Loading
Loading