From 21e6a858c69353eea9482299d4c05d0852e2a9a4 Mon Sep 17 00:00:00 2001 From: Malaber Date: Fri, 15 Sep 2023 15:15:42 +0200 Subject: [PATCH] Reorganize convertMatch --- js/redux/tournamentApi.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/redux/tournamentApi.js b/js/redux/tournamentApi.js index 2a35483..50bb15c 100644 --- a/js/redux/tournamentApi.js +++ b/js/redux/tournamentApi.js @@ -106,7 +106,9 @@ function convertGroup(apiGroup) { function convertMatch(apiMatch, allowUndecided) { const result = { - id: apiMatch.id, state: apiMatch.state, allowUndecided: allowUndecided, + id: apiMatch.id, + state: apiMatch.state, + allowUndecided: allowUndecided, winnerTeamId: apiMatch.winner === null ? null : apiMatch.winner.id, position: apiMatch.position + 1 };