aboutsummaryrefslogtreecommitdiff
path: root/src/background/components
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-10-09 15:30:05 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-10-09 15:30:05 +0900
commitc913dcdec775094daa9a64fa40034b3122320660 (patch)
tree978f2ad2581bc069e9369b28fe743b91c09f18a3 /src/background/components
parent355c0c64575adad4886647a1df3da173598b558b (diff)
parse json in settings
Diffstat (limited to 'src/background/components')
-rw-r--r--src/background/components/background.js12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/background/components/background.js b/src/background/components/background.js
index 0570a5a..06b6900 100644
--- a/src/background/components/background.js
+++ b/src/background/components/background.js
@@ -22,15 +22,7 @@ export default class BackgroundComponent {
}
update() {
- let state = this.store.getState();
- this.updateSettings(state);
- }
-
- updateSettings(setting) {
- if (!setting.settings.json) {
- return;
- }
- this.settings = JSON.parse(setting.settings.json);
+ this.settings = this.store.getState();
}
onMessage(message, sender) {
@@ -58,7 +50,7 @@ export default class BackgroundComponent {
});
});
case messages.SETTINGS_QUERY:
- return Promise.resolve(this.store.getState().settings);
+ return Promise.resolve(this.store.getState().value);
case messages.CONSOLE_QUERY_COMPLETIONS:
return commands.complete(message.text, this.settings);
case messages.SETTINGS_RELOAD: