From 37e49ae240ebfc08ea29993370822647a23c5f53 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Mon, 18 Oct 2021 23:18:26 +0100 Subject: [PATCH] :see_no_evil: Perform deep copy of config, to reset pointers --- src/store.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store.js b/src/store.js index 5c6adc1f..0efe467c 100644 --- a/src/store.js +++ b/src/store.js @@ -81,8 +81,8 @@ const store = new Vuex.Store({ actions: { /* Called when app first loaded. Reads config and sets state */ [INITIALIZE_CONFIG]({ commit }) { - const Accumulator = new ConfigAccumulator(); - const config = Accumulator.config(); + const deepCopy = (json) => JSON.parse(JSON.stringify(json)); + const config = deepCopy(new ConfigAccumulator().config()); commit(UPDATE_CONFIG, config); }, },