mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 21:07:27 +00:00
fix(role-identification): temporary fix to prevent some crash
This commit is contained in:
parent
9879146433
commit
1288ae8b27
1 changed files with 8 additions and 0 deletions
|
|
@ -205,6 +205,14 @@ class RoleIdentificationService {
|
||||||
metric: championPositions[champion][position],
|
metric: championPositions[champion][position],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Tmp fix
|
||||||
|
if (!Object.keys(positionsWithMetric).length) {
|
||||||
|
jungle = null
|
||||||
|
support = null
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
const bestPosition = Object.keys(positionsWithMetric).reduce((posA, posB) => {
|
const bestPosition = Object.keys(positionsWithMetric).reduce((posA, posB) => {
|
||||||
return positionsWithMetric[posA].metric > positionsWithMetric[posB].metric ? posA : posB
|
return positionsWithMetric[posA].metric > positionsWithMetric[posB].metric ? posA : posB
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue