diff --git a/src/components/scroll-context.tsx b/src/components/scroll-context.tsx index ad427659f..1f74f244f 100644 --- a/src/components/scroll-context.tsx +++ b/src/components/scroll-context.tsx @@ -15,7 +15,7 @@ export const ScrollContext: React.FC = ({ shouldUpdateScroll, ch const prevLocation = usePrevious(location); useEffect(() => { - if (prevLocation && shouldUpdateScroll(prevLocation, location)) { + if (prevLocation && (prevLocation.pathname !== location.pathname) && shouldUpdateScroll(prevLocation, location)) { window.scrollTo(0, 0); } }, [location, shouldUpdateScroll]);