Quick updates for #8989 - this issue appeared to be fixed already but just adding a few extra bits of security to make sure that looping only occurs when valid data is found in the binding.
This commit is contained in:
parent
e260204186
commit
27b472b662
|
@ -37,9 +37,13 @@ function getLoopIterations(loopStep: LoopStep, input: LoopInput) {
|
|||
if (!loopStep || !binding) {
|
||||
return 1
|
||||
}
|
||||
return Array.isArray(binding)
|
||||
? binding.length
|
||||
: automationUtils.stringSplit(binding).length
|
||||
if (Array.isArray(binding)) {
|
||||
return binding.length
|
||||
}
|
||||
if (typeof binding === "string") {
|
||||
return automationUtils.stringSplit(binding).length
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -280,13 +284,13 @@ class Orchestrator {
|
|||
break
|
||||
}
|
||||
|
||||
let item
|
||||
let item = []
|
||||
if (
|
||||
typeof loopStep.inputs.binding === "string" &&
|
||||
loopStep.inputs.option === "String"
|
||||
) {
|
||||
item = automationUtils.stringSplit(newInput.binding)
|
||||
} else {
|
||||
} else if (Array.isArray(loopStep.inputs.binding)) {
|
||||
item = loopStep.inputs.binding
|
||||
}
|
||||
this._context.steps[loopStepNumber] = {
|
||||
|
|
Loading…
Reference in New Issue