From 92d030eb91c4bc273d4a84afc0ac58e50a8a4080 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Sun, 31 Jan 2021 15:17:37 -0600 Subject: [PATCH] =?UTF-8?q?fix(web):=20=F0=9F=90=9B=20fix=20Description=20?= =?UTF-8?q?column=20sort=20to=20handle=20nulls?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/listsTable/ListsTable.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web/src/components/listsTable/ListsTable.tsx b/web/src/components/listsTable/ListsTable.tsx index 364d9007b..838936d19 100644 --- a/web/src/components/listsTable/ListsTable.tsx +++ b/web/src/components/listsTable/ListsTable.tsx @@ -113,7 +113,13 @@ export const ListsTable = (props: RouteComponentProps & Props) => { title="Description" key="Description" dataIndex={nameof("description")} - sorter={(a, b) => a.description.localeCompare(b.description)} + sorter={(a, b) => + a.description + ? b.description + ? a.description.localeCompare(b.description) + : -1 + : 1 + } width={ !tablePageSize.isNarrowWindow && !tablePageSize.isWideWindow ? 423