mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 21:07:27 +00:00
fix(summoner-overview): open mutliple match details
This commit is contained in:
parent
98325bedc3
commit
db1ee7ead7
1 changed files with 6 additions and 6 deletions
|
|
@ -19,7 +19,7 @@ export const mutations = {
|
||||||
matchDetails.ranksLoaded = ranksLoaded
|
matchDetails.ranksLoaded = ranksLoaded
|
||||||
|
|
||||||
// Set SoloQ as rank for now
|
// Set SoloQ as rank for now
|
||||||
if(ranksLoaded) {
|
if (ranksLoaded) {
|
||||||
for (const player of matchDetails.blueTeam.players) {
|
for (const player of matchDetails.blueTeam.players) {
|
||||||
player.rank = player.rank && player.rank[420]
|
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)
|
Vue.set(state.matches, index, matchDetails)
|
||||||
},
|
},
|
||||||
MATCH_RANKS_FOUND(state, { gameId, ranksByPlayer }) {
|
MATCH_RANKS_FOUND(state, { matchId, ranksByPlayer }) {
|
||||||
const match = state.matches.find(m => m.gameId === gameId)
|
const match = state.matches.find(m => m.matchId === matchId)
|
||||||
|
|
||||||
for (const player of match.blueTeam.players) {
|
for (const player of match.blueTeam.players) {
|
||||||
const ranks = ranksByPlayer[player.id]
|
const ranks = ranksByPlayer[player.id]
|
||||||
if(!ranks) continue
|
if (!ranks) continue
|
||||||
Vue.set(player, 'rank', ranks[420])
|
Vue.set(player, 'rank', ranks[420])
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const player of match.redTeam.players) {
|
for (const player of match.redTeam.players) {
|
||||||
const ranks = ranksByPlayer[player.id]
|
const ranks = ranksByPlayer[player.id]
|
||||||
if(!ranks) continue
|
if (!ranks) continue
|
||||||
Vue.set(player, 'rank', ranks[420])
|
Vue.set(player, 'rank', ranks[420])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue