@tanstack/router-core 1.132.0-alpha.20 → 1.132.0-alpha.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/router-core",
3
- "version": "1.132.0-alpha.20",
3
+ "version": "1.132.0-alpha.21",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
package/src/router.ts CHANGED
@@ -1274,27 +1274,26 @@ export class RouterCore<
1274
1274
 
1275
1275
  const loaderDepsHash = loaderDeps ? JSON.stringify(loaderDeps) : ''
1276
1276
 
1277
- const { interpolatedPath } = interpolatePath({
1277
+ const { interpolatedPath, usedParams } = interpolatePath({
1278
1278
  path: route.fullPath,
1279
1279
  params: routeParams,
1280
1280
  decodeCharMap: this.pathParamsDecodeCharMap,
1281
1281
  })
1282
1282
 
1283
- const interpolatePathResult = interpolatePath({
1284
- path: route.id,
1285
- params: routeParams,
1286
- leaveWildcards: true,
1287
- decodeCharMap: this.pathParamsDecodeCharMap,
1288
- parseCache: this.parsePathnameCache,
1289
- })
1290
-
1291
1283
  // Waste not, want not. If we already have a match for this route,
1292
1284
  // reuse it. This is important for layout routes, which might stick
1293
1285
  // around between navigation actions that only change leaf routes.
1294
1286
 
1295
1287
  // Existing matches are matches that are already loaded along with
1296
1288
  // pending matches that are still loading
1297
- const matchId = interpolatePathResult.interpolatedPath + loaderDepsHash
1289
+ const matchId =
1290
+ interpolatePath({
1291
+ path: route.id,
1292
+ params: routeParams,
1293
+ leaveWildcards: true,
1294
+ decodeCharMap: this.pathParamsDecodeCharMap,
1295
+ parseCache: this.parsePathnameCache,
1296
+ }).interpolatedPath + loaderDepsHash
1298
1297
 
1299
1298
  const existingMatch = this.getMatch(matchId)
1300
1299
 
@@ -1302,8 +1301,7 @@ export class RouterCore<
1302
1301
  (d) => d.routeId === route.id,
1303
1302
  )
1304
1303
 
1305
- const strictParams =
1306
- existingMatch?._strictParams ?? interpolatePathResult.usedParams
1304
+ const strictParams = existingMatch?._strictParams ?? usedParams
1307
1305
 
1308
1306
  let paramsError: PathParamError | undefined = undefined
1309
1307