mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Reset throttle timeout after clearing, fixes issue where scroll watcher doesnt fire
This commit is contained in:
parent
1220481b00
commit
6f8934fe59
1 changed files with 1 additions and 0 deletions
|
|
@ -40,6 +40,7 @@ export function useScrollWatcher(effect: Effect, delay: number): void {
|
|||
return () => {
|
||||
if (throttleTimeout.current) {
|
||||
clearTimeout(throttleTimeout.current)
|
||||
throttleTimeout.current = undefined
|
||||
}
|
||||
window.removeEventListener('scroll', handleScroll)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue