Sort matches for fullscreen view

This commit is contained in:
Thor77 2019-11-08 23:26:44 +01:00
parent 77f7b9b0f7
commit dcd2af03c7
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ export function getTournamentMatches(tournamentId, successCallback, errorCallbac
} }
getRequest(getState(), '/tournaments/' + tournamentId + '/matches' + matchFilter) getRequest(getState(), '/tournaments/' + tournamentId + '/matches' + matchFilter)
.then(response => { .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); .catch(errorCallback);
} }