Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

:see_no_evil: Perform deep copy of config, to reset pointers

Alicia Sykes37e49ae240eb
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);
},
},