prevent error with return on !window
This commit is contained in:
parent
c07cd1f103
commit
809399973b
|
|
@ -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]);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user