Skip to content
Snippets Groups Projects
Commit 91fc29b9 authored by Simon Künzel's avatar Simon Künzel
Browse files

Fix exception in job page

parent e83395ca
No related branches found
No related tags found
No related merge requests found
Pipeline #7538 failed
...@@ -82,7 +82,7 @@ function JobList({ jobsResp }: { jobsResp: GetJobsResponse }) { ...@@ -82,7 +82,7 @@ function JobList({ jobsResp }: { jobsResp: GetJobsResponse }) {
<td>{job.on_end_event_type}</td> <td>{job.on_end_event_type}</td>
<td> <td>
<ExpandableString <ExpandableString
value={job.on_end_event_data} value={job.on_end_event_data && JSON.stringify(job.on_end_event_data)}
maxLength={20} maxLength={20}
/> />
</td> </td>
......
...@@ -8,6 +8,9 @@ export function ExpandableString({ ...@@ -8,6 +8,9 @@ export function ExpandableString({
maxLength: number; maxLength: number;
}) { }) {
value = value ?? ""; value = value ?? "";
if (typeof value !== "string") {
throw new TypeError(`Cannot handle non-string value of type '${typeof value}': ${value}`);
}
const [expand, setExpand] = useState(false); const [expand, setExpand] = useState(false);
if (value.length <= maxLength) return value; if (value.length <= maxLength) return value;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment