From 387524a407be74c3d52758c2b98ef1f93c4289da Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Fri, 3 Nov 2017 14:54:13 +0900 Subject: fix plugin load --- src/content/components/common/index.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/content/components/common') diff --git a/src/content/components/common/index.js b/src/content/components/common/index.js index 4c2c1df..565632c 100644 --- a/src/content/components/common/index.js +++ b/src/content/components/common/index.js @@ -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); }); } } -- cgit v1.2.3