diff --git a/src/components/scroll-top-button.tsx b/src/components/scroll-top-button.tsx index 58d356c2a..9d6093663 100644 --- a/src/components/scroll-top-button.tsx +++ b/src/components/scroll-top-button.tsx @@ -44,10 +44,10 @@ const ScrollTopButton: React.FC = ({ /** Unload feed items if scrolled to the top. */ const maybeUnload = useCallback(() => { - if (autoload && scrolledTop) { + if (autoload && scrolledTop && count) { onClick(); } - }, [autoload, scrolledTop, onClick]); + }, [autoload, scrolledTop, count, onClick]); /** Set state while scrolling. */ const handleScroll = useCallback(throttle(() => {