load default settings
This commit is contained in:
parent
aecb4d9027
commit
7a85b203ac
3 changed files with 16 additions and 4 deletions
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
Reference in a new issue