aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings2/settings-display-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/settings2/settings-display-controller.js')
-rw-r--r--ext/bg/js/settings2/settings-display-controller.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/bg/js/settings2/settings-display-controller.js b/ext/bg/js/settings2/settings-display-controller.js
index 2be7bf92..d0fcffd9 100644
--- a/ext/bg/js/settings2/settings-display-controller.js
+++ b/ext/bg/js/settings2/settings-display-controller.js
@@ -73,8 +73,10 @@ class SettingsDisplayController {
});
menuSelectorObserver.observe(document.documentElement, false);
- this._contentNode.addEventListener('scroll', this._onScroll.bind(this), {passive: true});
- this._topLink.addEventListener('click', this._onTopLinkClick.bind(this), false);
+ if (this._topLink !== null) {
+ this._contentNode.addEventListener('scroll', this._onScroll.bind(this), {passive: true});
+ this._topLink.addEventListener('click', this._onTopLinkClick.bind(this), false);
+ }
window.addEventListener('keydown', this._onKeyDown.bind(this), false);
window.addEventListener('popstate', this._onPopState.bind(this), false);