Skip to content

Commit a13fca3

Browse files
committed
fix(results-page): hotfix result page causing an error when no project selected
This does not fix the underlying issue
1 parent addaa98 commit a13fca3

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

components/results/RerunJobButton.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,15 @@ export const RerunJobButton = ({ instance, disabled = false }: RerunJobButtonPro
2929
<Button color="primary" disabled={disabled} onClick={() => setOpen(true)}>
3030
Run again
3131
</Button>
32-
<JobModal
33-
instance={instance}
34-
jobId={instance.job_id}
35-
open={open}
36-
projectId={instance.project_id}
37-
onClose={() => setOpen(false)}
38-
/>
32+
{open && (
33+
<JobModal
34+
instance={instance}
35+
jobId={instance.job_id}
36+
open={open}
37+
projectId={instance.project_id}
38+
onClose={() => setOpen(false)}
39+
/>
40+
)}
3941
</>
4042
) : null;
4143
};

0 commit comments

Comments
 (0)