prevent error with return on !window
This commit is contained in:
parent
c07cd1f103
commit
809399973b
|
|
@ -22,6 +22,7 @@ function App() {
|
|||
const location = useLocation();
|
||||
|
||||
useEffect(() => {
|
||||
if (!window) return;
|
||||
window.scrollTo(0, 0);
|
||||
}, [location]);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user