From e10798def56ccc77315816ca54e32e623cf49dd5 Mon Sep 17 00:00:00 2001 From: Jacob Casper Date: Thu, 10 Feb 2022 14:15:47 -0600 Subject: [PATCH] Clearer order of operations --- hnim.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hnim.js b/hnim.js index aab3bc0..7ac3f5d 100644 --- a/hnim.js +++ b/hnim.js @@ -15,7 +15,7 @@ const visible = (element) => { let bounds = element.getBoundingClientRect(); - return Math.abs(bounds.bottom - bounds.top) > window.innerHeight || bounds.top >= 0 && bounds.bottom <= window.innerHeight; + return Math.abs(bounds.bottom - bounds.top) > window.innerHeight || (bounds.top >= 0 && bounds.bottom <= window.innerHeight); } const changeWithVisibleCallback = (comment, callback) => { -- 2.20.1