mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 12:57:28 +00:00
fix: last one... (hope so)
This commit is contained in:
parent
4fb7c4d6da
commit
565e2b32fa
2 changed files with 4 additions and 2 deletions
|
|
@ -57,7 +57,9 @@ export const mutations = {
|
||||||
},
|
},
|
||||||
KEEP_LAST_X_MATCHES(state, number) {
|
KEEP_LAST_X_MATCHES(state, number) {
|
||||||
state.overview.matches = state.overview.matches.slice(0, number)
|
state.overview.matches = state.overview.matches.slice(0, number)
|
||||||
state.overview.lastMatchId = state.overview.matches[state.overview.matches.length - 1].matchId
|
if (state.overview.matches.length > 0) {
|
||||||
|
state.overview.lastMatchId = state.overview.matches[state.overview.matches.length - 1].matchId
|
||||||
|
}
|
||||||
},
|
},
|
||||||
LIVE_FOUND(state, { live }) {
|
LIVE_FOUND(state, { live }) {
|
||||||
state.live.match = live
|
state.live.match = live
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ export default {
|
||||||
this.overviewRequest()
|
this.overviewRequest()
|
||||||
}
|
}
|
||||||
// Keep only the 10 last matches when summoner enters overview page
|
// Keep only the 10 last matches when summoner enters overview page
|
||||||
else if (this.overviewLoaded && this.summonerFound && this.overview.matches.length !== 10) {
|
else if (this.overviewLoaded && this.summonerFound && this.overview.matches.length > 10) {
|
||||||
this.sliceOverviewMatches(10)
|
this.sliceOverviewMatches(10)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue