🙈 Perform deep copy of config, to reset pointers
This commit is contained in:
@@ -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);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user