From 565682aff75ebc1f67b875b3afb46ea1b0e165b1 Mon Sep 17 00:00:00 2001 From: Valentin Kaelin Date: Sun, 27 Feb 2022 13:56:06 +0100 Subject: [PATCH] fix: load more button when Riot API is canceled --- client/src/store/modules/summoner.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/store/modules/summoner.js b/client/src/store/modules/summoner.js index e0a98fa..6953680 100644 --- a/client/src/store/modules/summoner.js +++ b/client/src/store/modules/summoner.js @@ -78,7 +78,7 @@ export const mutations = { state.records.recordsLoaded = false } - state.overview.moreMatchesToFetch = newMatches.length >= state.overview.NB_LOAD_GAMES - 1 + state.overview.moreMatchesToFetch = newMatches.length > 0 }, OVERVIEW_FOUND(state, infos) { state.basic.recentActivity = infos.stats.recentActivity @@ -86,7 +86,7 @@ export const mutations = { state.overview.stats = infos.stats state.overview.loaded = true state.records.recordsLoaded = false - state.overview.moreMatchesToFetch = infos.matches.length >= state.overview.NB_LOAD_GAMES - 1 + state.overview.moreMatchesToFetch = infos.matches.length > 0 }, RECORDS_FOUND(state, { records }) { state.records.list = records