-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
Which project does this relate to?
Router
Describe the bug
If the user visits a non-existing page and the app uses a useBlocker()
hook, the user can't navigate away from the page anymore. Clicking on a valid link will just throw an error Error: No route found for location /foo
(with /foo
being the 404 url).
Uncaught (in promise) Error: No route found for location /foo
at getLocation
at Object.blockerFnComposed [as blockerFn]
at tryNavigation
at Object.push
at RouterCore.commitLocation
at RouterCore.buildAndCommitLocation
at RouterCore.navigate
at handleClick
at chunk-ZMTB2JSC.js?v=c5950115:916:5
at Array.forEach (<anonymous>)
Your Example Website or App
https://stackblitz.com/edit/github-jxfdqrcu?file=src%2Fmain.tsx
Steps to Reproduce the Bug or Issue
- Open the repro
- Append "/foo" to the preview URL to get the "Not found" error
- Click on "Home" or "About"
=> Navigation doesn't work, there's an error in the console.
Expected behavior
As a user, I expected that navigation is triggered but it's not.
Screenshots or Videos
No response
Platform
- Router / Start Version: Router 1.130.12
- OS: macOS
- Browser: Brave
- Browser Version: 1.81.131
- Bundler: Vite
- Bundler Version: 6.3.5
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels