From 23a36438592ee652ea0677500df4156f62e203b0 Mon Sep 17 00:00:00 2001 From: Dean Date: Tue, 5 Nov 2024 16:05:35 +0000 Subject: [PATCH] Added offset for loop automation context updates. The error cases and feedback were displaying in the wrong steps. --- packages/server/src/threads/automation.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/server/src/threads/automation.ts b/packages/server/src/threads/automation.ts index b37ec8dc73..d13be8d410 100644 --- a/packages/server/src/threads/automation.ts +++ b/packages/server/src/threads/automation.ts @@ -400,7 +400,7 @@ class Orchestrator { ) } catch (err) { this.updateContextAndOutput( - pathStepIdx, + pathStepIdx + 1, steps[stepToLoopIndex], {}, { @@ -420,7 +420,7 @@ class Orchestrator { (loopStep.inputs.iterations && loopStepIndex === maxIterations) ) { this.updateContextAndOutput( - pathStepIdx, + pathStepIdx + 1, steps[stepToLoopIndex], { items: this.loopStepOutputs, @@ -447,7 +447,7 @@ class Orchestrator { if (isFailure) { this.updateContextAndOutput( - pathStepIdx, + pathStepIdx + 1, steps[stepToLoopIndex], { items: this.loopStepOutputs,