1
0
Fork 0
mirror of synced 2024-09-25 13:51:40 +12:00

fix issue with loop bindings showing for non loop steps

This commit is contained in:
Peter Clement 2024-09-20 11:53:48 +01:00
parent 069875e945
commit 7d4aa25244

View file

@ -752,13 +752,21 @@
: allSteps[idx].icon
if (wasLoopBlock) {
loopBlockCount++
schema = cloneDeep(allSteps[idx - 1]?.schema?.outputs?.properties)
}
Object.entries(schema).forEach(([name, value]) => {
addBinding(name, value, icon, idx, isLoopBlock, bindingName)
})
}
if (
allSteps[blockIdx - 1]?.stepId !== ActionStepID.LOOP &&
allSteps
.slice(0, blockIdx)
.some(step => step.stepId === ActionStepID.LOOP)
) {
bindings = bindings.filter(x => !x.readableBinding.includes("loop"))
}
return bindings
}