From 93f57e8c7d7a4f28ad3f786f9802eb6951ef3b83 Mon Sep 17 00:00:00 2001 From: Valentin Kaelin Date: Wed, 8 Jan 2020 19:04:58 +0100 Subject: [PATCH] fix: filter champions by queue: reset queue when tab is changed --- .../src/components/Summoner/Champions/FilterQueue.vue | 11 ++++++++++- client/src/store/modules/summoner.js | 6 ++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/client/src/components/Summoner/Champions/FilterQueue.vue b/client/src/components/Summoner/Champions/FilterQueue.vue index 1c28c46..1f82b95 100644 --- a/client/src/components/Summoner/Champions/FilterQueue.vue +++ b/client/src/components/Summoner/Champions/FilterQueue.vue @@ -18,6 +18,8 @@ diff --git a/client/src/store/modules/summoner.js b/client/src/store/modules/summoner.js index 39f329a..7ab3864 100644 --- a/client/src/store/modules/summoner.js +++ b/client/src/store/modules/summoner.js @@ -31,6 +31,9 @@ export const mutations = { state.champions.championsLoaded = false state.overview.loaded = false }, + CHAMPIONS_NOT_FOUND(state) { + state.champions.championsLoaded = false + }, CHAMPIONS_FOUND(state, { champions }) { state.champions.list = champions state.champions.championsLoaded = true @@ -91,6 +94,9 @@ export const actions = { console.log(error) } }, + championsNotLoaded({ commit }) { + commit('CHAMPIONS_NOT_FOUND') + }, async championsRequest({ commit }, queue = null) { const resp = await axios(({ url: 'summoner-champions', data: { puuid: state.basic.account.puuid, queue: queue }, method: 'POST' })).catch(() => { }) console.log('---CHAMPIONS---')