aboutsummaryrefslogtreecommitdiff
path: root/src/content/components/common/index.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-11-04 22:52:17 +0000
committerGitHub <noreply@github.com>2017-11-04 22:52:17 +0000
commit516a701ebb9403b271288349b10bd906a61feee0 (patch)
tree9fea26233e2efbed9b921199eebf04adaec3cf34 /src/content/components/common/index.js
parente1fdba693519d36b4be634908070ec65ca442a42 (diff)
parent387524a407be74c3d52758c2b98ef1f93c4289da (diff)
Merge pull request #129 from ueokande/retry-setting-load
fix plugin load
Diffstat (limited to 'src/content/components/common/index.js')
-rw-r--r--src/content/components/common/index.js4
1 files changed, 4 insertions, 0 deletions
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);
});
}
}