diff --git a/cateditor/src/pages/list/store/index.js b/cateditor/src/pages/list/store/index.js index d93c74f..46f6aaa 100644 --- a/cateditor/src/pages/list/store/index.js +++ b/cateditor/src/pages/list/store/index.js @@ -60,14 +60,15 @@ export const store = new Vuex.Store({ }, actions: { - async loadMyCatalogs({ commit }) { + async loadMyCatalogs({ commit, state }) { try { commit('setLoadingMyCatalogs', true) const response = await axios.get('/api/v1/catalogs/mine') if ('catalogs' in response.data) { // console.log('recieved catalogs:', response.data.catalogs) commit('setMyCatalogs', response.data.catalogs) - if (response.data.catalogs.length > 0) { + if (response.data.catalogs.length > 0 && + state.selectedCatalog == null) { commit('setSelectedCatalog', response.data.catalogs[0]) } } else {