diff --git a/server/app/Services/RoleIdentificationService.js b/server/app/Services/RoleIdentificationService.js index 9c30464..1456baa 100644 --- a/server/app/Services/RoleIdentificationService.js +++ b/server/app/Services/RoleIdentificationService.js @@ -205,6 +205,14 @@ class RoleIdentificationService { 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) => { return positionsWithMetric[posA].metric > positionsWithMetric[posB].metric ? posA : posB })