@tanstack/react-router 1.4.2 → 1.4.4
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/path.js +4 -1
- package/build/cjs/path.js.map +1 -1
- package/build/cjs/router.js +1 -1
- package/build/cjs/router.js.map +1 -1
- package/build/esm/index.js +5 -2
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +355 -355
- package/build/umd/index.development.js +5 -2
- 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/path.ts +4 -1
- package/src/router.ts +2 -2
|
@@ -1427,7 +1427,10 @@
|
|
|
1427
1427
|
if (routeSegment) {
|
|
1428
1428
|
if (routeSegment.type === 'wildcard') {
|
|
1429
1429
|
if (baseSegment?.value) {
|
|
1430
|
-
|
|
1430
|
+
const _splat = joinPaths(baseSegments.slice(i).map(d => d.value));
|
|
1431
|
+
// TODO: Deprecate *
|
|
1432
|
+
params['*'] = _splat;
|
|
1433
|
+
params['_splat'] = _splat;
|
|
1431
1434
|
return true;
|
|
1432
1435
|
}
|
|
1433
1436
|
return false;
|
|
@@ -2474,7 +2477,7 @@
|
|
|
2474
2477
|
buildLocation = opts => {
|
|
2475
2478
|
const build = (dest = {}, matches) => {
|
|
2476
2479
|
const from = this.latestLocation;
|
|
2477
|
-
const fromSearch = (this.state.pendingMatches || this.state.matches).
|
|
2480
|
+
const fromSearch = (this.state.pendingMatches || this.state.matches).reverse()[0]?.search || from.search;
|
|
2478
2481
|
let pathname = this.resolvePathWithBase(from.pathname, `${dest.to ?? ''}`);
|
|
2479
2482
|
const fromMatches = this.matchRoutes(from.pathname, fromSearch);
|
|
2480
2483
|
const stayingMatches = matches?.filter(d => fromMatches?.find(e => e.routeId === d.routeId));
|