use correct code
This commit is contained in:
@@ -29,15 +29,8 @@ export default {
|
|||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
let response = await highscoreStatistics();
|
let response = await highscoreStatistics();
|
||||||
response.sort((a, b) => {
|
response.sort((a, b) => a.wins.length < b.wins.length ? 1 : -1)
|
||||||
return a.wins.length > b.wins.length ? -1 : 1;
|
this.highscore = this.generateScoreBoard(response.slice(0, 5));
|
||||||
});
|
|
||||||
response = response.filter(
|
|
||||||
person => person.name != null && person.name != ""
|
|
||||||
);
|
|
||||||
this.highscore = response.slice(0, 5);
|
|
||||||
// response.sort((a, b) => a.wins.length < b.wins.length ? 1 : -1)
|
|
||||||
// this.highscore = this.generateScoreBoard(response.slice(0, 10));
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
generateScoreBoard(highscore=this.highscore) {
|
generateScoreBoard(highscore=this.highscore) {
|
||||||
|
|||||||
Reference in New Issue
Block a user