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