fix(frontend): createInlineScript only create trigger script if step = 0

This commit is contained in:
Ruben Fiszel
2022-07-17 18:48:36 +02:00
parent 8272b11107
commit bd004cff0f
@@ -52,8 +52,8 @@ export async function pickScript(path: string, step: number) {
export async function createInlineScriptModule(language: FlowModuleValue.language, step: number, mode: FlowMode) {
const code = language === FlowModuleValue.language.DENO ? (
mode === 'pull' ? DENO_INIT_CODE_TRIGGER : DENO_INIT_CODE) : (
mode === 'pull' ? PYTHON_INIT_CODE_TRIGGER : PYTHON_INIT_CODE
(mode === 'pull' && step == 0) ? DENO_INIT_CODE_TRIGGER : DENO_INIT_CODE) : (
(mode === 'pull' && step == 0) ? PYTHON_INIT_CODE_TRIGGER : PYTHON_INIT_CODE
)
flowStore.update((flow: Flow) => {
flow.value.modules[step].value = {