diff --git a/app/javascript/components/editor/useSubmissionsList.ts b/app/javascript/components/editor/useSubmissionsList.ts index 05d6f60754..391cb01439 100644 --- a/app/javascript/components/editor/useSubmissionsList.ts +++ b/app/javascript/components/editor/useSubmissionsList.ts @@ -154,11 +154,15 @@ export const useSubmissionsList = ( method: 'GET', }) - fetch.then((json) => { - const testRun = typecheck(json, 'testRun') + fetch + .then((json) => { + const testRun = typecheck(json, 'testRun') - set(current.uuid, { ...current, testRun: testRun }) - }) + set(current.uuid, { ...current, testRun: testRun }) + }) + .catch(() => { + remove(current.uuid) + }) }, [set]) return { current, create, set, remove }