Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions packages/docs/src/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export const Router: React.FC<RouterProps> = (props) => {
// Auto scroll to top - this should be handled by the browser per spec,
// but currently Chrome and Safari do not follow the spec.
useEffect(() => {
// @ts-expect-error -- TypeScript does not yet know about the Navigation API
const navigation = window.navigation;
if (!navigation) {
return;
Expand All @@ -18,8 +17,8 @@ export const Router: React.FC<RouterProps> = (props) => {
() => {
const transition = navigation.transition;
if (
transition.navigationType === "push" ||
transition.navigationType === "replace"
transition?.navigationType === "push" ||
transition?.navigationType === "replace"
) {
// Safari is known to ignore scrolling immediately after a push/replace navigation, so we wait a bit
// Also, Safari doesn't handle scrolling to 0, so we use the -1 trick
Expand Down
26 changes: 13 additions & 13 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ catalog:
"@vitejs/plugin-react": ^6.0.1
react: ^19.2.4
react-dom: ^19.2.4
typescript: ^5.9.3
typescript: ^6.0.2
vite: ^8.0.3

onlyBuiltDependencies:
Expand Down