fix(frontend): don't loop for completed jobs [#649] (#650)

closes #649
This commit is contained in:
Jakub Kołodziejczak
2022-09-30 22:46:56 +02:00
committed by GitHub
parent 331356c991
commit ada4d653f4
@@ -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)