@tanstack/router-core 1.162.1 → 1.162.2

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.
@@ -346,26 +346,18 @@ class RouterCore {
346
346
  fromParams,
347
347
  functionalUpdate(dest.params, fromParams)
348
348
  );
349
- const interpolatedNextTo = interpolatePath({
350
- path: nextTo,
351
- params: nextParams,
352
- decoder: this.pathParamsDecoder,
353
- server: this.isServer
354
- }).interpolatedPath;
355
- const destMatchResult = this.getMatchedRoutes(interpolatedNextTo);
349
+ const destMatchResult = this.getMatchedRoutes(nextTo);
356
350
  let destRoutes = destMatchResult.matchedRoutes;
357
- const isGlobalNotFound = destMatchResult.foundRoute ? destMatchResult.foundRoute.path !== "/" && destMatchResult.routeParams["**"] : trimPathRight(interpolatedNextTo);
351
+ const isGlobalNotFound = !destMatchResult.foundRoute || destMatchResult.foundRoute.path !== "/" && destMatchResult.routeParams["**"];
358
352
  if (isGlobalNotFound && this.options.notFoundRoute) {
359
353
  destRoutes = [...destRoutes, this.options.notFoundRoute];
360
354
  }
361
- let changedParams = false;
362
355
  if (Object.keys(nextParams).length > 0) {
363
356
  for (const route of destRoutes) {
364
357
  const fn = route.options.params?.stringify ?? route.options.stringifyParams;
365
358
  if (fn) {
366
359
  try {
367
360
  Object.assign(nextParams, fn(nextParams));
368
- changedParams = true;
369
361
  } catch {
370
362
  }
371
363
  }
@@ -376,7 +368,7 @@ class RouterCore {
376
368
  // This preserves the original parameter syntax including optional parameters
377
369
  nextTo
378
370
  ) : decodePath(
379
- !changedParams ? interpolatedNextTo : interpolatePath({
371
+ interpolatePath({
380
372
  path: nextTo,
381
373
  params: nextParams,
382
374
  decoder: this.pathParamsDecoder,