diff --git a/src/App.vue b/src/App.vue index 578f67d9..d1f0e761 100644 --- a/src/App.vue +++ b/src/App.vue @@ -65,7 +65,7 @@ export default { }, }, created() { - this.$store.dispatch('initializeConfig'); + this.$store.dispatch(Keys.INITIALIZE_CONFIG); }, methods: { /* Injects the users custom CSS as a style tag */ diff --git a/src/store.js b/src/store.js index 0a893ef8..5c6adc1f 100644 --- a/src/store.js +++ b/src/store.js @@ -9,6 +9,7 @@ import filterUserSections from '@/utils/CheckSectionVisibility'; Vue.use(Vuex); const { + INITIALIZE_CONFIG, UPDATE_CONFIG, SET_MODAL_OPEN, SET_LANGUAGE, @@ -79,7 +80,7 @@ const store = new Vuex.Store({ }, actions: { /* Called when app first loaded. Reads config and sets state */ - initializeConfig({ commit }) { + [INITIALIZE_CONFIG]({ commit }) { const Accumulator = new ConfigAccumulator(); const config = Accumulator.config(); commit(UPDATE_CONFIG, config); diff --git a/src/utils/StoreMutations.js b/src/utils/StoreMutations.js index 5841f177..2134e9fa 100644 --- a/src/utils/StoreMutations.js +++ b/src/utils/StoreMutations.js @@ -1,5 +1,6 @@ // A list of mutation names const KEY_NAMES = [ + 'INITIALIZE_CONFIG', 'UPDATE_CONFIG', 'SET_MODAL_OPEN', 'SET_LANGUAGE',