summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-09-14 15:29:43 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-09-14 15:29:43 -0400
commit0067dfeacc3ecaf1215f1b9026c500bff31761e6 (patch)
treed647185948c268d5a3ebea698e9ce3c2c9d4509a /ext
parent8b1e4d1c6fc5f496c05bb69fe9e6b2cd12c9090b (diff)
Remove redundant call of popupTimerClear
Also use explicit null checks rather than truthy checks.
Diffstat (limited to 'ext')
-rw-r--r--ext/fg/js/frontend.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index 31b43ad3..c98a9a33 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -77,7 +77,7 @@ class Frontend {
}
onMouseOver(e) {
- if (e.target === this.popup.container && this.popupTimer) {
+ if (e.target === this.popup.container && this.popupTimer !== null) {
this.popupTimerClear();
}
}
@@ -269,12 +269,11 @@ class Frontend {
}
popupTimerSet(callback) {
- this.popupTimerClear();
this.popupTimer = window.setTimeout(callback, this.options.scanning.delay);
}
popupTimerClear() {
- if (this.popupTimer) {
+ if (this.popupTimer !== null) {
window.clearTimeout(this.popupTimer);
this.popupTimer = null;
}