You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cloudkite
changed the title
new href builder produces invalid URL on optional segments
href() builder produces invalid URL on optional segments
Feb 19, 2025
I'm using React Router as a...
Framework
Reproduction
Given that i have a route in routes.ts as :
System Info
Used Package Manager
npm
Expected Behavior
href("task/:taskId/v?/:versionId?", { taskId: "123" }) === "task/123"
href("task/:taskId/v?/:versionId?", { taskId: "123", versionId: "hello" }) === "task/123/v/hello"
Actual Behavior
href("task/:taskId/v?/:versionId?", { taskId: "123" }) === "task/123/v?"
href("task/:taskId/v?/:versionId?", { taskId: "123", versionId: "hello" }) === "task/123/v?/hello"
The text was updated successfully, but these errors were encountered: