Skip to content

Commit

Permalink
fix(core): Continue with error output reverse items in success branch (
Browse files Browse the repository at this point in the history
  • Loading branch information
ShireenMissi authored Nov 13, 2024
1 parent 70d315b commit 6d5ee83
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 190 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/WorkflowExecute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,7 @@ export class WorkflowExecute {
: [];

while (items.length) {
const item = items.pop();
const item = items.shift();
if (item === undefined) {
continue;
}
Expand Down
6 changes: 5 additions & 1 deletion packages/core/test/WorkflowExecute.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,11 @@ describe('WorkflowExecute', () => {
if (nodeData.data === undefined) {
return null;
}
return nodeData.data.main[0];
return nodeData.data.main[0]!.map((entry) => {
// remove pairedItem from entry if it is an error output test
if (testData.description.includes('error_outputs')) delete entry.pairedItem;
return entry;
});
});

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

0 comments on commit 6d5ee83

Please sign in to comment.