diff --git a/frontend/src/lib/components/TestJobLoader.svelte b/frontend/src/lib/components/TestJobLoader.svelte index f3838a3a2e..0f6b130557 100644 --- a/frontend/src/lib/components/TestJobLoader.svelte +++ b/frontend/src/lib/components/TestJobLoader.svelte @@ -91,11 +91,13 @@ } else { job = await JobService.getJob({ workspace: $workspaceStore!, id }) } - if (job?.type === 'CompletedJob' && isLoading) { + if (job?.type === 'CompletedJob') { //only CompletedJob has success property - dispatch('done', job) clearInterval(intervalId) - isLoading = false + if (isLoading) { + dispatch('done', job) + isLoading = false + } } } catch (err) { console.error(err)