mirror of
https://github.com/cupcakearmy/nicco.io.git
synced 2025-09-05 18:20:45 +00:00
nan check
This commit is contained in:
@@ -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(() => {
|
||||
|
Reference in New Issue
Block a user