Fix date sorting

This commit is contained in:
Jakob Fahr 2020-07-14 11:01:50 +02:00
parent 561dadd2c5
commit ce02728399
No known key found for this signature in database
GPG Key ID: 8873416D8E4CEF6B
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ export function sortByStringAscending<T>(items: T[], key: (T) => string) {
}
export function sortByDateAscending<T>(items: T[], key: (T) => Date) {
return items.sort((a, b) => <any>key(b) - <any>key(a));
return items.sort((a, b) => (key(a) as any) - (key(b) as any));
}
export function getNumberForPriority(priority: Priority): number {