We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Router
If a route has both a validateSearch and a beforeLoad that redirects:
validateSearch
beforeLoad
export const Route = createFileRoute('/about')({ validateSearch: zod.object({ a: zod.number(), }), beforeLoad: async ({ search }) => { throw redirect({ to: '/third', search }); }, });
When landing on such page with an invalid search, the search object forwarded through the redirection is an empty object.
search
https://stackblitz.com/edit/tanstack-router-yhzqerey?file=src%2Froutes%2Fabout.tsx
/
I would have expected either:
errorComponent
But instead, we're redirected correctly, but the search becomes an empty object. There is no indication of an error:
onError
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Which project does this relate to?
Router
Describe the bug
If a route has both a
validateSearch
and abeforeLoad
that redirects:When landing on such page with an invalid search, the
search
object forwarded through the redirection is an empty object.Your Example Website or App
https://stackblitz.com/edit/tanstack-router-yhzqerey?file=src%2Froutes%2Fabout.tsx
Steps to Reproduce the Bug or Issue
/
homepage on the stackblitz repro aboveExpected behavior
I would have expected either:
errorComponent
)search
untouchedBut instead, we're redirected correctly, but the search becomes an empty object. There is no indication of an error:
errorComponent
gets mountedonError
callback gets calledScreenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: