aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/config-manager.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/scripts/lib/config-manager.js')
-rw-r--r--app/scripts/lib/config-manager.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js
index 3a1f12ac0..01e6ccc3c 100644
--- a/app/scripts/lib/config-manager.js
+++ b/app/scripts/lib/config-manager.js
@@ -19,6 +19,7 @@ module.exports = ConfigManager
function ConfigManager (opts) {
// ConfigManager is observable and will emit updates
this._subs = []
+ this.store = opts.store
/* The migrator exported on the config-manager
* has two methods the user should be concerned with:
@@ -36,12 +37,9 @@ function ConfigManager (opts) {
// config data format, and returns the new one.
migrations: migrations,
- // How to load initial config.
- // Includes step on migrating pre-pojo-migrator data.
- loadData: opts.loadData,
-
- // How to persist migrated config.
- setData: opts.setData,
+ // Data persistence methods
+ loadData: () => this.store.get(),
+ setData: (value) => this.store.put(value),
})
}