@tanstack/react-router 1.4.2 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2474,7 +2474,7 @@
2474
2474
  buildLocation = opts => {
2475
2475
  const build = (dest = {}, matches) => {
2476
2476
  const from = this.latestLocation;
2477
- const fromSearch = (this.state.pendingMatches || this.state.matches).at(-1)?.search || from.search;
2477
+ const fromSearch = (this.state.pendingMatches || this.state.matches).reverse()[0]?.search || from.search;
2478
2478
  let pathname = this.resolvePathWithBase(from.pathname, `${dest.to ?? ''}`);
2479
2479
  const fromMatches = this.matchRoutes(from.pathname, fromSearch);
2480
2480
  const stayingMatches = matches?.filter(d => fromMatches?.find(e => e.routeId === d.routeId));