Skip to content

Commit

Permalink
JobList: Filter jobs with a nullish id
Browse files Browse the repository at this point in the history
Paddles should not give us broken job objects like this, but we should also
not crash if it does :)

Signed-off-by: Zack Cerza <zack@redhat.com>
  • Loading branch information
zmc committed Feb 21, 2024
1 parent 52d509c commit 5d91123
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/JobList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ type JobListProps = {

export default function JobList({ query, sortMode }: JobListProps) {
const options = useDefaultTableOptions<Job>();
const data = query.data?.jobs || [];
const data = (query.data?.jobs || []).filter(item => item.id);
const table = useMaterialReactTable({
...options,
columns,
Expand Down

0 comments on commit 5d91123

Please sign in to comment.