From 3c9bd2f5cae1c4e6d2a1bfbee67f019696879fe9 Mon Sep 17 00:00:00 2001 From: Collin 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