WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 1beb3fd

Browse files
committed
add fallback navigation behavior
1 parent 2d87c2e commit 1beb3fd

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/file-router/Navigation.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,13 @@ export function NavigationProvider({ children }: { children: ReactNode }) {
5858
}
5959
})
6060
}
61-
window.navigation.addEventListener("navigate", onNavigate)
62-
return () => {
63-
window.navigation.removeEventListener("navigate", onNavigate)
61+
try {
62+
window.navigation.addEventListener("navigate", onNavigate)
63+
return () => {
64+
window.navigation.removeEventListener("navigate", onNavigate)
65+
}
66+
} catch {
67+
console.log('Navigation API not supported, defaulting to MPA behavior.')
6468
}
6569
}, [])
6670
return (

src/router.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export const ROUTES = {
8888
image: visual_exec_image
8989
},
9090
git: {
91-
lastModified: 1761070823000,
91+
lastModified: 1761395963000,
9292
firstAdded: 1760983403000
9393
},
9494
},

0 commit comments

Comments
 (0)