fix plugin load

This commit is contained in:
Shin'ya Ueoka 2017-11-03 14:54:13 +09:00
parent e4ff3a78fb
commit 387524a407
4 changed files with 9 additions and 2 deletions

View file

@ -32,6 +32,10 @@ export default class Common {
type: messages.SETTINGS_QUERY,
}).then((settings) => {
this.store.dispatch(settingActions.set(settings));
}).catch((e) => {
// Sometime sendMessage fails when background script is not ready.
console.warn(e);
setTimeout(() => this.reloadSettings(), 500);
});
}
}

View file

@ -1,6 +1,8 @@
import actions from 'content/actions';
const defaultState = {};
const defaultState = {
keymaps: {},
};
export default function reducer(state = defaultState, action = {}) {
switch (action.type) {