From cf30ef0cd503b3b9dee882202d64ba9db9922ee3 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sun, 6 May 2018 21:35:11 +0900 Subject: [PATCH] update indicator on loaded --- src/content/components/common/index.js | 2 +- src/content/components/top-content/index.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/content/components/common/index.js b/src/content/components/common/index.js index c76a7d9..9b7b083 100644 --- a/src/content/components/common/index.js +++ b/src/content/components/common/index.js @@ -15,7 +15,7 @@ export default class Common { input.onKey(key => keymapper.key(key)); this.store = store; - this.prevEnabled = this.store.getState().addon.enabled; + this.prevEnabled = undefined; this.reloadSettings(); diff --git a/src/content/components/top-content/index.js b/src/content/components/top-content/index.js index cb9e160..a0d0480 100644 --- a/src/content/components/top-content/index.js +++ b/src/content/components/top-content/index.js @@ -44,6 +44,8 @@ export default class TopContent { .some(regex => regex.test(partial)); if (matched) { this.store.dispatch(addonActions.disable()); + } else { + this.store.dispatch(addonActions.enable()); } }