We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
at
reverse
1 parent c054f26 commit a4bfbf1Copy full SHA for a4bfbf1
packages/react-router/src/router.ts
@@ -710,8 +710,8 @@ export class Router<
710
): ParsedLocation => {
711
const from = this.latestLocation
712
const fromSearch =
713
- (this.state.pendingMatches || this.state.matches).at(-1)?.search ||
714
- from.search
+ (this.state.pendingMatches || this.state.matches).reverse()[0]
+ ?.search || from.search
715
let pathname = this.resolvePathWithBase(from.pathname, `${dest.to ?? ''}`)
716
717
const fromMatches = this.matchRoutes(from.pathname, fromSearch)
0 commit comments