diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-01 13:37:27 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-01 13:46:15 +0900 |
commit | 7a85b203aca9b88a6e659987246a4b3915df2174 (patch) | |
tree | 5db67f42fa033a5793e0905824319ab64447eed0 /src/actions | |
parent | aecb4d9027de9de7cc6c5ce20a5ec0c4ccb1d99a (diff) |
load default settings
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/setting.js | 6 |
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); }; |