aboutsummaryrefslogtreecommitdiff
path: root/src/content/index.js
diff options
context:
space:
mode:
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
+}