Skip to content

Commit

Permalink
check if window is defined before setting scroll restoration
Browse files Browse the repository at this point in the history
  • Loading branch information
joetannenbaum committed Jan 15, 2025
1 parent 04e0d51 commit 87f465a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/history.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class History {
}
}

if (window.history.scrollRestoration) {
if (typeof window !== 'undefined' && window.history.scrollRestoration) {
window.history.scrollRestoration = 'manual'
}

Expand Down

0 comments on commit 87f465a

Please sign in to comment.