refactor/match_collector: refactor platform handling logic
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
areTreeSimilars,
|
||||
treeDeriveTags
|
||||
} from './item_tree'
|
||||
import { PLATFORM_KEYS } from './platform'
|
||||
|
||||
import { Match, Timeline, Participant, Frame } from './api'
|
||||
|
||||
@@ -345,10 +346,10 @@ function handleMatch(match: Match, champions: Map<number, ChampionData>, platfor
|
||||
// Track region distribution for this lane
|
||||
if (lane.regionDistribution && platform) {
|
||||
const platformKey = platform.toLowerCase()
|
||||
if (platformKey === 'euw1') lane.regionDistribution.euw++
|
||||
else if (platformKey === 'eun1') lane.regionDistribution.eun++
|
||||
else if (platformKey === 'na1') lane.regionDistribution.na++
|
||||
else if (platformKey === 'kr') lane.regionDistribution.kr++
|
||||
const regionKey = PLATFORM_KEYS[platformKey]
|
||||
if (regionKey) {
|
||||
lane.regionDistribution[regionKey]!++
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize matchups if not present
|
||||
|
||||
Reference in New Issue
Block a user