From 5625455e5e1b9d9bdef4cffe1751d32be0e0cc98 Mon Sep 17 00:00:00 2001 From: Thor77 Date: Sat, 9 Nov 2019 15:06:46 +0100 Subject: [PATCH] Soert group scores by group points --- 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 99e701e..572e325 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, + scores: apiGroup.group_scores.sort((a, b) => b.group_points > a.group_points), matches: apiGroup.matches.sort((a, b) => a.position > b.position).map(match => convertMatch(match, true)) }; }