@tanstack/react-router 1.5.5 → 1.5.7
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.
- package/build/cjs/router.js +2 -1
- package/build/cjs/router.js.map +1 -1
- package/build/esm/index.js +2 -1
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +397 -397
- package/build/umd/index.development.js +2 -1
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +2 -2
- package/src/router.ts +3 -2
|
@@ -2482,7 +2482,8 @@
|
|
|
2482
2482
|
};
|
|
2483
2483
|
buildLocation = opts => {
|
|
2484
2484
|
const build = (dest = {}, matches) => {
|
|
2485
|
-
const
|
|
2485
|
+
const relevantMatches = this.state.pendingMatches || this.state.matches;
|
|
2486
|
+
const fromSearch = relevantMatches[relevantMatches.length - 1]?.search || this.latestLocation.search;
|
|
2486
2487
|
let pathname = this.resolvePathWithBase(dest.from ?? this.latestLocation.pathname, `${dest.to ?? ''}`);
|
|
2487
2488
|
const fromMatches = this.matchRoutes(this.latestLocation.pathname, fromSearch);
|
|
2488
2489
|
const stayingMatches = matches?.filter(d => fromMatches?.find(e => e.routeId === d.routeId));
|