Skip to content

Commit

Permalink
Fix job date sorting
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Bui-Quang <[email protected]>
  • Loading branch information
pl-buiquang committed Jul 6, 2022
1 parent cdc4cca commit ea906a3
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,13 @@ function LauncherHistory(props: Props) {
const j2CompletionDate =
j2.completionDate || defaultCompletionDate;
if (j1CompletionDate === j2CompletionDate) {
return j1.creationDate > j2.creationDate ? -1 : 1;
return moment(j1.creationDate).isAfter(moment(j2.creationDate))
? -1
: 1;
}
return j1CompletionDate > j2CompletionDate ? -1 : 1;
return moment(j1CompletionDate).isAfter(moment(j2CompletionDate))
? -1
: 1;
})
);
} catch (e) {
Expand Down

0 comments on commit ea906a3

Please sign in to comment.