🙈 Perform deep copy of config, to reset pointers

This commit is contained in:
Alicia Sykes 2021-10-18 23:18:26 +01:00
parent 1ed55b42c6
commit 37e49ae240
1 changed files with 2 additions and 2 deletions

View File

@ -81,8 +81,8 @@ const store = new Vuex.Store({
actions: { actions: {
/* Called when app first loaded. Reads config and sets state */ /* Called when app first loaded. Reads config and sets state */
[INITIALIZE_CONFIG]({ commit }) { [INITIALIZE_CONFIG]({ commit }) {
const Accumulator = new ConfigAccumulator(); const deepCopy = (json) => JSON.parse(JSON.stringify(json));
const config = Accumulator.config(); const config = deepCopy(new ConfigAccumulator().config());
commit(UPDATE_CONFIG, config); commit(UPDATE_CONFIG, config);
}, },
}, },