Sorting is hard
This commit is contained in:
@@ -16,7 +16,7 @@ export default {
|
|||||||
let _response = await fetch("/api/highscore/statistics");
|
let _response = await fetch("/api/highscore/statistics");
|
||||||
let response = await _response.json();
|
let response = await _response.json();
|
||||||
response.sort((a, b) => {
|
response.sort((a, b) => {
|
||||||
return a.wins.length > b.wins.length ? 1 : -1;
|
return a.wins.length > b.wins.length ? -1 : 1;
|
||||||
});
|
});
|
||||||
this.highscore = response;
|
this.highscore = response;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user