diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-09-17 20:22:29 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-17 20:22:29 -0400 |
commit | ad8e9fe8e2c6496b1dcc834fd4fa2c365a3bd42a (patch) | |
tree | bd4643105dbf4d819e798e6a20c4c642c9bfcf6b /ext | |
parent | 0998bbf8d60b0af7a686d8a010f2c4a237c51cc1 (diff) |
Add missing null check (#836)
Diffstat (limited to 'ext')
-rw-r--r-- | ext/fg/js/frontend.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js index da620136..e3988c94 100644 --- a/ext/fg/js/frontend.js +++ b/ext/fg/js/frontend.js @@ -399,8 +399,10 @@ class Frontend { this._clearSelection(true); this._popupEventListeners.removeAllEventListeners(); this._popup = popup; - this._popupEventListeners.on(popup, 'framePointerOver', this._onPopupFramePointerOver.bind(this)); - this._popupEventListeners.on(popup, 'framePointerOut', this._onPopupFramePointerOut.bind(this)); + if (popup !== null) { + this._popupEventListeners.on(popup, 'framePointerOver', this._onPopupFramePointerOver.bind(this)); + this._popupEventListeners.on(popup, 'framePointerOut', this._onPopupFramePointerOut.bind(this)); + } this._isPointerOverPopup = false; } |