aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings2/settings-display-controller.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-12-13 12:32:43 -0500
committerGitHub <noreply@github.com>2020-12-13 12:32:43 -0500
commit14b9e0621b34d34411c1e3eec8ff1d89b6717756 (patch)
treeba61a325b45f1ced24b63a3e614ba41f5b032bcb /ext/bg/js/settings2/settings-display-controller.js
parent5d2edda7534360def79921eb9d38ef72b4f6da04 (diff)
Updated welcome page (#1107)
* Make storage controller optional * Make more elements optional * Update styles * Create new welcome page * Update URL for welcome guide * Remove old guide * Fix unused global
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);