From b4e8b32ec60ecc2b2d4576a9ccbd7f606befc343 Mon Sep 17 00:00:00 2001 From: Collin Barrett Date: Tue, 25 Sep 2018 18:56:47 -0500 Subject: [PATCH] treat null UpdatedDates as old in sort --- .../home/components/listsTable/columns/UpdatedDate.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/columns/UpdatedDate.tsx b/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/columns/UpdatedDate.tsx index 094eda4e4..de0663451 100644 --- a/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/columns/UpdatedDate.tsx +++ b/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/columns/UpdatedDate.tsx @@ -18,8 +18,8 @@ export const UpdatedDate = (columnVisibility: IColumnVisibility[]) => { }; const sortMethod = (a: string, b: string) => - moment(a).isValid() - ? (moment(b).isValid() + a && moment(a).isValid() + ? (b && moment(b).isValid() ? (moment(a).isBefore(b) ? -1 : 1)