treat null UpdatedDates as old in sort

This commit is contained in:
Collin Barrett 2018-09-25 18:56:47 -05:00
parent 26518ddaa4
commit b4e8b32ec6

View file

@ -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)