router
router copied to clipboard
loader called 2 times when route uses searchParams with quoted values
Describe the bug
If a route uses validationSearch like: validateSearch: z.object({ token: z.string() }) and you go to a route with ?token="qwe" query, the loader is called 2 times, but if you go to the same route with ?token=qwe query, the loader is called once.
Your Example Website or App
https://stackblitz.com/edit/tanstack-router-n3bfz9
Steps to Reproduce the Bug or Issue
- Click
Go /home?token="qwe"link - Check the logs in the console,
Home loader qweis logged 2 times - Click
Go /home?token=qwelink - Check logs in console,
Home loader qweis logged once
Expected behavior
Navigating to Go /home?token="qwe" should trigger loader only once
Screenshots or Videos
No response
Platform
- OS: mac
- Browser: Firefox
- Version: 121
Additional context
No response