From a60a343db72c54bc5f62e9125cba104bb9647b09 Mon Sep 17 00:00:00 2001 From: Thor77 Date: Fri, 8 Nov 2019 23:26:44 +0100 Subject: [PATCH] Sort matches in fullscreen view --- 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 c2478af..99e701e 100644 --- a/js/redux/tournamentApi.js +++ b/js/redux/tournamentApi.js @@ -40,7 +40,7 @@ export function getTournamentMatches(tournamentId, successCallback, errorCallbac } getRequest(getState(), '/tournaments/' + tournamentId + '/matches' + matchFilter) .then(response => { - successCallback(response.status, response.data.map(match => convertMatch(match))); + successCallback(response.status, response.data.sort((a, b) => a.position > b.position).map(match => convertMatch(match))); }) .catch(errorCallback); }