mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-06 16:02:23 +00:00
better preprocessing fix
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import type { Schema } from '$lib/common'
|
||||
|
||||
import { allTrue } from '$lib/utils'
|
||||
import { allTrue, sendUserToast } from '$lib/utils'
|
||||
import { RefreshCw } from 'lucide-svelte'
|
||||
import ArgInput from './ArgInput.svelte'
|
||||
import { Button } from './common'
|
||||
@@ -101,8 +101,11 @@
|
||||
let args = $state(<Record<string, any>>{})
|
||||
|
||||
onMount(() => {
|
||||
if (!testSteps) {
|
||||
sendUserToast('testSteps module not initialized. Preview will not work.', true)
|
||||
}
|
||||
testSteps?.updateStepArgs(mod.id, flowStateStore.val, flowStore?.val, previewArgs?.val)
|
||||
args = testSteps?.getStepArgs(mod.id) ?? { value: {} }
|
||||
args = testSteps?.getStepArgs(mod.id)
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -21,7 +21,11 @@ export class TestSteps {
|
||||
this.#steps[moduleId].value = args
|
||||
}
|
||||
|
||||
getStepArgs(moduleId: string): ModuleArgs | undefined {
|
||||
getStepArgs(moduleId: string): ModuleArgs {
|
||||
let args = this.#steps[moduleId]
|
||||
if (!args) {
|
||||
this.#steps[moduleId] = { value: {} }
|
||||
}
|
||||
return this.#steps[moduleId]
|
||||
}
|
||||
|
||||
@@ -143,10 +147,6 @@ export class TestSteps {
|
||||
flow: OpenFlow | undefined,
|
||||
previewArgs: Record<string, any> | undefined
|
||||
) {
|
||||
if (id == 'preprocessor') {
|
||||
this.#steps[id] = { value: {} }
|
||||
return
|
||||
}
|
||||
if (!flowState || !flow) {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user