Skip to content

Commit bd004cf

Browse files
committed
fix(frontend): createInlineScript only create trigger script if step = 0
1 parent 8272b11 commit bd004cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frontend/src/lib/components/flows/flowStore.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ export async function pickScript(path: string, step: number) {
5252

5353
export async function createInlineScriptModule(language: FlowModuleValue.language, step: number, mode: FlowMode) {
5454
const code = language === FlowModuleValue.language.DENO ? (
55-
mode === 'pull' ? DENO_INIT_CODE_TRIGGER : DENO_INIT_CODE) : (
56-
mode === 'pull' ? PYTHON_INIT_CODE_TRIGGER : PYTHON_INIT_CODE
55+
(mode === 'pull' && step == 0) ? DENO_INIT_CODE_TRIGGER : DENO_INIT_CODE) : (
56+
(mode === 'pull' && step == 0) ? PYTHON_INIT_CODE_TRIGGER : PYTHON_INIT_CODE
5757
)
5858
flowStore.update((flow: Flow) => {
5959
flow.value.modules[step].value = {

0 commit comments

Comments
 (0)