Space search

This commit is contained in:
Ben
2026-02-14 21:27:36 -05:00
committed by Jon Staab
parent 407b4dce94
commit c2d0ec92bf
4 changed files with 627 additions and 34 deletions
+5 -5
View File
@@ -118,6 +118,10 @@ export const scrollToEvent = async (id: string, attempts = 3): Promise<boolean>
return true
} else if (elements.length > 0) {
if (attempts <= 0) {
return false
}
const lastElement = last(elements)
if (lastElement && !isIntersecting(lastElement)) {
@@ -126,11 +130,7 @@ export const scrollToEvent = async (id: string, attempts = 3): Promise<boolean>
await sleep(300)
if (attempts > 0) {
return scrollToEvent(id, attempts - 1)
} else {
return false
}
return scrollToEvent(id, attempts - 1)
}
return false