From 71a5ef96bbdc899e0fb9755be0df9fea06deb019 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Sat, 22 Sep 2018 09:44:57 -0500 Subject: [PATCH] add null check to Langs filter closes #506 --- .../modules/home/components/listsTable/ListsTable.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/ListsTable.tsx b/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/ListsTable.tsx index c98f70d4a..8eb82a412 100644 --- a/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/ListsTable.tsx +++ b/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/ListsTable.tsx @@ -94,15 +94,20 @@ export const ListsTable = (props: IProps) => { accessor: "languages", filterable: true, filterMethod: (f: any, r: any) => - f.value === "any" || r[f.id].map((x: any) => x.iso6391).includes(f.value), + f.value === "any" || + (r[f.id] + ? r[f.id].map((x: any) => x.iso6391).includes(f.value) + : false), Filter: ({ filter, onChange }) => , sortable: false, Cell: (c: any) => c.value