aboutsummaryrefslogtreecommitdiff
path: root/src/content/index.js
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2017-11-02 11:41:11 +0000
committerGitHub <noreply@github.com>2017-11-02 11:41:11 +0000
commit9f1a18352fcac690ea714e84f6b1f6d6201ffd67 (patch)
treeeced7b1cc76935aea8e9de2a0cbf79649b032052 /src/content/index.js
parentc4996ef5d8d5d85f49732bb01b6da13b66ea81d5 (diff)
parent14241ca842b7dc92f26252a0ac7bb7e549d560c8 (diff)
Merge pull request #123 from ueokande/64-follow-area-tags
follow area tags
Diffstat (limited to 'src/content/index.js')
-rw-r--r--src/content/index.js14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/content/index.js b/src/content/index.js
index 77249f8..97a8b30 100644
--- a/src/content/index.js
+++ b/src/content/index.js
@@ -6,12 +6,8 @@ import FrameContentComponent from './components/frame-content';
const store = createStore(reducers);
-let rootComponent = window.self === window.top
- ? new TopContentComponent(window, store)
- : new FrameContentComponent(window, store);
-
-store.subscribe(() => {
- rootComponent.update();
-});
-
-rootComponent.update();
+if (window.self === window.top) {
+ new TopContentComponent(window, store); // eslint-disable-line no-new
+} else {
+ new FrameContentComponent(window, store); // eslint-disable-line no-new
+}