Skip to content

Commit

Permalink
[desk-tool] Use string comparison for faster sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars committed Oct 6, 2020
1 parent f275565 commit fcb23ed
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,5 @@ export function collectLatestAuthorAnnotations(diff: Diff): AnnotationDetails[]
return true
})

return Array.from(authorMap.values()).sort(
(a, b) => Date.parse(b.timestamp) - Date.parse(a.timestamp)
)
return Array.from(authorMap.values()).sort((a, b) => (a.timestamp < b.timestamp ? 1 : -1))
}

0 comments on commit fcb23ed

Please sign in to comment.