mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 21:07:27 +00:00
fix(role-identification): better fix to remove duplicate
This commit is contained in:
parent
dc6b7617d3
commit
e73b231db2
2 changed files with 2 additions and 2 deletions
|
|
@ -197,7 +197,7 @@ class RoleIdentificationService {
|
|||
// Done! Grab the results.
|
||||
const positionsWithMetric = {}
|
||||
for (const [position, champion] of Object.entries(positions)) {
|
||||
if (Object.keys(identified).includes(position)) {
|
||||
if (Object.keys(identified).includes(position) || champion === jungle || champion === support) {
|
||||
continue
|
||||
}
|
||||
positionsWithMetric[position] = {
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ class MatchTransformer {
|
|||
const teamSupports = team.filter(p => p.support && !p.jungle)
|
||||
const support = teamSupports.length === 1 ? teamSupports[0].champion : null
|
||||
|
||||
return RoleIdentificationService.getRoles(this.championRoles, team.map(p => p.champion), null, support)
|
||||
return RoleIdentificationService.getRoles(this.championRoles, team.map(p => p.champion), jungle, support)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue