prevent error with return on !window

This commit is contained in:
Antoine M 2024-05-16 17:08:53 +02:00
parent c07cd1f103
commit 809399973b

View File

@ -22,6 +22,7 @@ function App() {
const location = useLocation(); const location = useLocation();
useEffect(() => { useEffect(() => {
if (!window) return;
window.scrollTo(0, 0); window.scrollTo(0, 0);
}, [location]); }, [location]);