mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 12:57:28 +00:00
fix: ally/enemy teams position in match details
This commit is contained in:
parent
7a199d3194
commit
ec47fe2372
1 changed files with 8 additions and 2 deletions
|
|
@ -47,10 +47,16 @@ export default {
|
|||
|
||||
computed: {
|
||||
allyTeam() {
|
||||
return this.data.blueTeam.players.some(p => p.name.toLowerCase() === this.$route.params.name.toLowerCase()) ? this.data.blueTeam : this.data.redTeam
|
||||
return this.data.blueTeam.players.some(p => this.compareSummonernames(p.name, this.$route.params.name)) ? this.data.blueTeam : this.data.redTeam
|
||||
},
|
||||
enemyTeam() {
|
||||
return this.data.blueTeam.players.some(p => p.name.toLowerCase() === this.$route.params.name.toLowerCase()) ? this.data.redTeam : this.data.blueTeam
|
||||
return this.data.blueTeam.players.some(p => this.compareSummonernames(p.name, this.$route.params.name)) ? this.data.redTeam : this.data.blueTeam
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
compareSummonernames(a, b) {
|
||||
return a.toLowerCase().replace(/ /g, '') === b.toLowerCase().replace(/ /g, '')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue