fix: order of the matches is correct again

This commit is contained in:
Valentin Kaelin 2019-09-30 19:50:13 +02:00
parent 4f13d8400e
commit 7e93dcd311

View file

@ -117,7 +117,7 @@ class SummonerController {
}
/* Sort 10 matches */
matchesDetails.sort((a, b) => (a.gameCreation < b.gameCreation) ? -1 : 1)
matchesDetails.sort((a, b) => (a.date < b.date) ? 1 : -1)
finalJSON.matchesDetails = matchesDetails
finalJSON.allMatches = matches