Skip to content

Commit 3a1247e

Browse files
committed
fix(tolerance): downward scope correction
1 parent 8b53ee6 commit 3a1247e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/headroom/index.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
const up = scrolled > 0
4242
if (!scrolled
4343
|| (
44-
up && scrolled < toleranceUp
45-
|| Math.abs(scrolled) < toleranceDown
44+
! up && Math.abs(scrolled) < toleranceDown
45+
|| up && scrolled < toleranceUp
4646
)
4747
) return headerClass
4848
return (up) ? 'pin' : 'unpin'

0 commit comments

Comments
 (0)