From db1ee7ead746d5b0c52dd1ffe9ccb5695693527a Mon Sep 17 00:00:00 2001 From: Valentin Kaelin Date: Tue, 1 Feb 2022 23:43:42 +0100 Subject: [PATCH] fix(summoner-overview): open mutliple match details --- client/src/store/modules/detailedMatch.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client/src/store/modules/detailedMatch.js b/client/src/store/modules/detailedMatch.js index 47c977d..ea34564 100644 --- a/client/src/store/modules/detailedMatch.js +++ b/client/src/store/modules/detailedMatch.js @@ -19,7 +19,7 @@ export const mutations = { matchDetails.ranksLoaded = ranksLoaded // Set SoloQ as rank for now - if(ranksLoaded) { + if (ranksLoaded) { for (const player of matchDetails.blueTeam.players) { player.rank = player.rank && player.rank[420] } @@ -28,21 +28,21 @@ export const mutations = { } } - const index = state.matches.findIndex(m => m.gameId === matchDetails.gameId) + const index = state.matches.findIndex(m => m.matchId === matchDetails.matchId) Vue.set(state.matches, index, matchDetails) }, - MATCH_RANKS_FOUND(state, { gameId, ranksByPlayer }) { - const match = state.matches.find(m => m.gameId === gameId) + MATCH_RANKS_FOUND(state, { matchId, ranksByPlayer }) { + const match = state.matches.find(m => m.matchId === matchId) for (const player of match.blueTeam.players) { const ranks = ranksByPlayer[player.id] - if(!ranks) continue + if (!ranks) continue Vue.set(player, 'rank', ranks[420]) } for (const player of match.redTeam.players) { const ranks = ranksByPlayer[player.id] - if(!ranks) continue + if (!ranks) continue Vue.set(player, 'rank', ranks[420]) }