Use async/await on background
This commit is contained in:
parent
88238005ab
commit
48e4bccf0d
12 changed files with 273 additions and 316 deletions
|
@ -1,13 +1,12 @@
|
|||
import actions from '../actions';
|
||||
import * as settingsStorage from 'shared/settings/storage';
|
||||
|
||||
const load = () => {
|
||||
return settingsStorage.loadValue().then((value) => {
|
||||
return {
|
||||
type: actions.SETTING_SET_SETTINGS,
|
||||
value,
|
||||
};
|
||||
});
|
||||
const load = async() => {
|
||||
let value = await settingsStorage.loadValue();
|
||||
return {
|
||||
type: actions.SETTING_SET_SETTINGS,
|
||||
value,
|
||||
};
|
||||
};
|
||||
|
||||
const setProperty = (name, value) => {
|
||||
|
|
Reference in a new issue