aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-09-27 23:14:52 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-09-28 11:28:15 -0400
commit928d7aecd5018ed71f0409fdad95f7c1b2a768bb (patch)
tree873527fdec5c7124c2939720a4cfee2faf219b5b
parent8110de514edaae5c685282668826bf14db7db557 (diff)
Directly return rather than use a temporary variable
-rw-r--r--ext/fg/js/source.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/fg/js/source.js b/ext/fg/js/source.js
index 2e73be06..d8b1977b 100644
--- a/ext/fg/js/source.js
+++ b/ext/fg/js/source.js
@@ -95,12 +95,10 @@ class TextSourceRange {
}
const style = window.getComputedStyle(node);
- const hidden =
+ return !(
style.visibility === 'hidden' ||
style.display === 'none' ||
- parseFloat(style.fontSize) === 0;
-
- return !hidden;
+ parseFloat(style.fontSize) === 0);
}
static seekForward(node, offset, length) {