diff --git a/frontend/src/lib/components/FlowPreviewContent.svelte b/frontend/src/lib/components/FlowPreviewContent.svelte index 4acb34c201..4ce3600a75 100644 --- a/frontend/src/lib/components/FlowPreviewContent.svelte +++ b/frontend/src/lib/components/FlowPreviewContent.svelte @@ -90,7 +90,7 @@ {/if}
- {#if job} + {#if job?.id} mapJobResultsToFlowState(e.detail, 'upto', steps - 1)} diff --git a/frontend/src/lib/components/FlowStatusViewer.svelte b/frontend/src/lib/components/FlowStatusViewer.svelte index a360d3bd45..08f7874152 100644 --- a/frontend/src/lib/components/FlowStatusViewer.svelte +++ b/frontend/src/lib/components/FlowStatusViewer.svelte @@ -27,6 +27,22 @@ let forloop_selected = '' let isReadyIndex = $arePreviewsReady.push(false) + function shouldReset() { + if (jobId != lastJobid) { + lastJobid = jobId + jobResult = { + job: undefined, + innerJobs: [], + loopJobs: [] + } + loadJobInProgress() + } + } + + let lastJobid = jobId + + $: jobId && shouldReset() + async function loadJobInProgress() { const job = await JobService.getJob({ workspace: $workspaceStore ?? '', @@ -124,5 +140,5 @@ {/if}
{:else} - Loading + No script selected {/if}