diff --git a/src/FilterLists.Web/src/components/listsTable/ListsTable.tsx b/src/FilterLists.Web/src/components/listsTable/ListsTable.tsx index fbfc851c4..64a7bccc8 100644 --- a/src/FilterLists.Web/src/components/listsTable/ListsTable.tsx +++ b/src/FilterLists.Web/src/components/listsTable/ListsTable.tsx @@ -138,7 +138,10 @@ export const ListsTable = (props: RouteComponentProps & Props) => { sorter={(a, b) => { const getSoftwareIds = (l: List) => software - .filter((s: Software) => s.syntaxIds.includes(l.syntaxId)) + .filter( + (s: Software) => + s.syntaxIds && s.syntaxIds.includes(l.syntaxId) + ) .map(s => s.id); return arraySorter(getSoftwareIds(a), getSoftwareIds(b), software); }} @@ -169,8 +172,8 @@ export const ListsTable = (props: RouteComponentProps & Props) => { render={(syntaxId: number) => syntaxId ? ( - s.syntaxIds.includes(syntaxId) + software={software.filter( + (s: Software) => s.syntaxIds && s.syntaxIds.includes(syntaxId) )} /> ) : null