File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/backend/src/helpers Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ export function computeForEachParameters({
9191
9292 let dataValue : IJSONValue = keyPath
9393 let forEachKeyPath = get ( data , keyPath )
94- const currentStepIndex = stepPositions [ executionStep ?. stepId ]
94+ const currentStepIndex = stepPositions ?. [ executionStep ?. stepId ] || - 1
9595
9696 // handling of checkboxes which is just a flat array
9797 forEachKeyPath = String ( forEachKeyPath ) . replace (
@@ -103,14 +103,14 @@ export function computeForEachParameters({
103103 executionStep . appKey === TOOLBOX_APP_KEY &&
104104 executionStep . key === TOOLBOX_ACTIONS . FOR_EACH
105105 ) {
106- dataValue = get ( data , forEachKeyPath as string )
106+ dataValue = get ( data , forEachKeyPath as string ) || ''
107107 } else if ( currentStepIndex > forEachStepIndex ) {
108108 // find the specific execution step for the same iteration
109109 const iterationExecutionStep = executionSteps . find (
110110 ( es ) =>
111111 es . stepId === stepId && es . metadata . iteration === metadata ?. iteration ,
112112 )
113- dataValue = get ( iterationExecutionStep ?. dataOut , keyPath )
113+ dataValue = get ( iterationExecutionStep ?. dataOut , keyPath ) || ''
114114 }
115115 return dataValue
116116}
You can’t perform that action at this time.
0 commit comments