Use async/await on background

This commit is contained in:
Shin'ya Ueoka 2018-06-17 20:21:39 +09:00
parent 88238005ab
commit 48e4bccf0d
12 changed files with 273 additions and 316 deletions

View file

@ -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) => {