Display correct selector label for JS Scripting

This commit is contained in:
Mel O'Hagan 2022-04-07 15:09:53 +01:00
parent 9746ac3ac6
commit 0d2b9c39e2
1 changed files with 4 additions and 1 deletions

View File

@ -104,7 +104,10 @@
) )
bindings = bindings.concat( bindings = bindings.concat(
outputs.map(([name, value]) => { outputs.map(([name, value]) => {
const runtime = idx === 0 ? `trigger.${name}` : `steps.${idx}.${name}` const stepsLabel = block.name.toLowerCase().includes("bash")
? `steps.${idx}.${name}`
: `steps[${idx - 1}].${name}`
const runtime = idx === 0 ? `trigger.${name}` : stepsLabel
return { return {
label: runtime, label: runtime,
type: value.type, type: value.type,