From cc010ae78d1fba87e5df5f8296e568669a17d03f Mon Sep 17 00:00:00 2001 From: Thor77 Date: Sat, 2 Jul 2022 15:20:01 +0200 Subject: [PATCH] Fix group score match order --- js/redux/tournamentApi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/redux/tournamentApi.js b/js/redux/tournamentApi.js index b48e2c6..9e20d06 100644 --- a/js/redux/tournamentApi.js +++ b/js/redux/tournamentApi.js @@ -80,7 +80,7 @@ function convertGroup(apiGroup) { return { id: apiGroup.id, number: apiGroup.number, - scores: apiGroup.group_scores.sort((a, b) => b.group_points > a.group_points), + scores: apiGroup.group_scores.sort((a, b) => b.group_points > a.group_points || b.difference_in_points > a.difference_in_points || b.scored_points > a.scored_points), matches: apiGroup.matches.sort((a, b) => a.position > b.position).map(match => convertMatch(match, true)) }; }