aboutsummaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-10-01 13:37:27 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2017-10-01 13:46:15 +0900
commit7a85b203aca9b88a6e659987246a4b3915df2174 (patch)
tree5db67f42fa033a5793e0905824319ab64447eed0 /src/actions
parentaecb4d9027de9de7cc6c5ce20a5ec0c4ccb1d99a (diff)
load default settings
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/setting.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/actions/setting.js b/src/actions/setting.js
index d8e889e..7898f06 100644
--- a/src/actions/setting.js
+++ b/src/actions/setting.js
@@ -1,9 +1,13 @@
import actions from '../actions';
import messages from '../content/messages';
+import DefaultSettings from '../shared/default-settings';
const load = () => {
return browser.storage.local.get('settings').then((value) => {
- return set(value.settings);
+ if (value.settings) {
+ return set(value.settings);
+ }
+ return set(DefaultSettings);
}, console.error);
};