mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 12:57:28 +00:00
fix: remove NaN errors in role winrates
This commit is contained in:
parent
ec2bdd3ae0
commit
1e3462ebcd
1 changed files with 1 additions and 1 deletions
|
|
@ -222,7 +222,7 @@ export default {
|
|||
|
||||
methods: {
|
||||
calculateWinrate(wins, count) {
|
||||
const winrate = wins / count * 100
|
||||
const winrate = count !== 0 ? wins / count * 100 : 0
|
||||
const color = winrate >= 50 ? 'text-green-400' : 'text-red-400'
|
||||
return {
|
||||
winrate,
|
||||
|
|
|
|||
Loading…
Reference in a new issue