fix: check if player has perks in live game tab (riot api invalid data)

This commit is contained in:
Valentin Kaelin 2020-06-11 20:46:55 +02:00
parent 02996c8883
commit 8b73271823

View file

@ -31,7 +31,7 @@ class LiveMatchTransformer extends MatchTransformer {
// Perks // Perks
for (const participant of match.participants) { for (const participant of match.participants) {
participant.runes = super.getPerksImages(participant.perks.perkIds[0], participant.perks.perkSubStyle) participant.runes = participant.perks ? super.getPerksImages(participant.perks.perkIds[0], participant.perks.perkSubStyle) : {}
} }
const requestsParticipants = match.participants.map(p => this._getPlayerDatq(p, region)) const requestsParticipants = match.participants.map(p => this._getPlayerDatq(p, region))