mirror of
https://github.com/cupcakearmy/nicco.io.git
synced 2024-12-21 23:56:26 +00:00
nan check
This commit is contained in:
parent
e08bf4e3ad
commit
d1a3416577
@ -29,7 +29,7 @@
|
||||
function updateScroll(e) {
|
||||
const el = e.target
|
||||
const percentage = el.scrollTop / (el.scrollHeight - el.offsetHeight)
|
||||
scroll.set(percentage)
|
||||
scroll.set(isNaN(percentage) ? 0 : percentage)
|
||||
}
|
||||
|
||||
onMount(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user