diff --git a/client/src/components/Summoner/Champions/ChampionsTable.vue b/client/src/components/Summoner/Champions/ChampionsTable.vue index 330d4b1..e869926 100644 --- a/client/src/components/Summoner/Champions/ChampionsTable.vue +++ b/client/src/components/Summoner/Champions/ChampionsTable.vue @@ -271,11 +271,12 @@ export default { }, updateChampionsList() { this.championsFull = this.champions.map((champ, index) => { + let kda = champ.kills === 0 && champ.assists === 0 && champ.deaths === 0 ? 0 : (champ.kills + champ.assists) / champ.deaths return { ...champ, winrate: champ.wins * 100 / champ.count, playrate: champ.count * 100 / this.totalGames, - kda: (champ.kills + champ.assists) / champ.deaths, + kda, index, lastPlayed: timeDifference(champ.date), show: true diff --git a/client/src/components/Summoner/Overview/SummonerChampions.vue b/client/src/components/Summoner/Overview/SummonerChampions.vue index 2e29ce5..50aa85a 100644 --- a/client/src/components/Summoner/Overview/SummonerChampions.vue +++ b/client/src/components/Summoner/Overview/SummonerChampions.vue @@ -111,6 +111,9 @@ export default { methods: { kda(kills, deaths, assists) { + if (kills === 0 && deaths === 0 && assists === 0) { + return 0 + } return this.$options.filters.round((kills + assists) / deaths) }, widthBar(value, total) {