fix broken trigger binding
This commit is contained in:
parent
3c56fdc4c1
commit
dc23977619
|
@ -641,6 +641,8 @@
|
||||||
let hasUserDefinedName = automation.stepNames?.[allSteps[idx]?.id]
|
let hasUserDefinedName = automation.stepNames?.[allSteps[idx]?.id]
|
||||||
if (isLoopBlock) {
|
if (isLoopBlock) {
|
||||||
runtimeName = `loop.${name}`
|
runtimeName = `loop.${name}`
|
||||||
|
} else if (idx === 0) {
|
||||||
|
runtimeName = `trigger.${name}`
|
||||||
} else if (block.name.startsWith("JS")) {
|
} else if (block.name.startsWith("JS")) {
|
||||||
runtimeName = hasUserDefinedName
|
runtimeName = hasUserDefinedName
|
||||||
? `stepsByName["${bindingName}"].${name}`
|
? `stepsByName["${bindingName}"].${name}`
|
||||||
|
@ -650,7 +652,7 @@
|
||||||
? `stepsByName.${bindingName}.${name}`
|
? `stepsByName.${bindingName}.${name}`
|
||||||
: `steps.${idx - loopBlockCount}.${name}`
|
: `steps.${idx - loopBlockCount}.${name}`
|
||||||
}
|
}
|
||||||
return idx === 0 ? `trigger.${name}` : runtimeName
|
return runtimeName
|
||||||
}
|
}
|
||||||
|
|
||||||
const determineCategoryName = (idx, isLoopBlock, bindingName) => {
|
const determineCategoryName = (idx, isLoopBlock, bindingName) => {
|
||||||
|
@ -677,7 +679,7 @@
|
||||||
)
|
)
|
||||||
return {
|
return {
|
||||||
readableBinding:
|
readableBinding:
|
||||||
bindingName && !isLoopBlock
|
bindingName && !isLoopBlock && idx !== 0
|
||||||
? `steps.${bindingName}.${name}`
|
? `steps.${bindingName}.${name}`
|
||||||
: runtimeBinding,
|
: runtimeBinding,
|
||||||
runtimeBinding,
|
runtimeBinding,
|
||||||
|
|
Loading…
Reference in New Issue