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 <[email protected]>
  • Loading branch information
zmc committed Oct 20, 2023
1 parent a1f3653 commit 5010c91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/JobList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,11 @@ export default function JobList({ query, params, setter, pagingMode }: JobListPr
const onFilterModelChange = (model: GridFilterModel) => {
setter({ status: model.items[0].value || null });
};
const rows = (query.data?.jobs || []).filter(item => item.id);
return (
<DataGrid
columns={columns}
rows={query.data?.jobs || []}
rows={rows}
loading={query.isLoading || query.isFetching}
initialState={{
sorting: {
Expand Down

0 comments on commit 5010c91

Please sign in to comment.