From 5bcc033809154e01bfcde50ebace9df1de16bcd5 Mon Sep 17 00:00:00 2001 From: Seth Ladygo Date: Tue, 1 Oct 2019 15:45:03 -0700 Subject: [PATCH] catalog list: fix bug on data update when pub cat selected --- cateditor/src/pages/list/store/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cateditor/src/pages/list/store/index.js b/cateditor/src/pages/list/store/index.js index 6b0346a..7242041 100644 --- a/cateditor/src/pages/list/store/index.js +++ b/cateditor/src/pages/list/store/index.js @@ -57,7 +57,9 @@ export const store = new Vuex.Store({ commit('setSelectedCatalog', response.data.catalogs[0]) } else { let cat = response.data.catalogs.find(c => c.id === state.selectedCatalog.id) - commit('setSelectedCatalog', cat) + if (cat) { + commit('setSelectedCatalog', cat) + } // otherwise might be a public catalog } } } else {