@tanstack/router-core 1.131.37 → 1.131.38

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.
@@ -930,26 +930,6 @@ class RouterCore {
930
930
  }
931
931
  return root.rootRouteId;
932
932
  })();
933
- const parseErrors = matchedRoutes.map((route) => {
934
- var _a2;
935
- let parsedParamsError;
936
- const parseParams = ((_a2 = route.options.params) == null ? void 0 : _a2.parse) ?? route.options.parseParams;
937
- if (parseParams) {
938
- try {
939
- const parsedParams = parseParams(routeParams);
940
- Object.assign(routeParams, parsedParams);
941
- } catch (err) {
942
- parsedParamsError = new PathParamError(err.message, {
943
- cause: err
944
- });
945
- if (opts == null ? void 0 : opts.throwOnError) {
946
- throw parsedParamsError;
947
- }
948
- return parsedParamsError;
949
- }
950
- }
951
- return;
952
- });
953
933
  const matches = [];
954
934
  const getParentContext = (parentMatch) => {
955
935
  const parentMatchId = parentMatch == null ? void 0 : parentMatch.id;
@@ -1001,14 +981,22 @@ class RouterCore {
1001
981
  decodeCharMap: this.pathParamsDecodeCharMap,
1002
982
  parseCache: this.parsePathnameCache
1003
983
  });
1004
- const strictParams = interpolatePathResult.usedParams;
1005
- let paramsError = parseErrors[index];
1006
- const strictParseParams = ((_c = route.options.params) == null ? void 0 : _c.parse) ?? route.options.parseParams;
1007
- if (strictParseParams) {
1008
- try {
1009
- Object.assign(strictParams, strictParseParams(strictParams));
1010
- } catch (err) {
1011
- if (!paramsError) {
984
+ const matchId = interpolatePathResult.interpolatedPath + loaderDepsHash;
985
+ const existingMatch = this.getMatch(matchId);
986
+ const previousMatch = this.state.matches.find(
987
+ (d) => d.routeId === route.id
988
+ );
989
+ const strictParams = (existingMatch == null ? void 0 : existingMatch._strictParams) ?? interpolatePathResult.usedParams;
990
+ let paramsError = void 0;
991
+ if (!existingMatch) {
992
+ const strictParseParams = ((_c = route.options.params) == null ? void 0 : _c.parse) ?? route.options.parseParams;
993
+ if (strictParseParams) {
994
+ try {
995
+ Object.assign(
996
+ strictParams,
997
+ strictParseParams(strictParams)
998
+ );
999
+ } catch (err) {
1012
1000
  paramsError = new PathParamError(err.message, {
1013
1001
  cause: err
1014
1002
  });
@@ -1018,11 +1006,7 @@ class RouterCore {
1018
1006
  }
1019
1007
  }
1020
1008
  }
1021
- const matchId = interpolatePathResult.interpolatedPath + loaderDepsHash;
1022
- const existingMatch = this.getMatch(matchId);
1023
- const previousMatch = this.state.matches.find(
1024
- (d) => d.routeId === route.id
1025
- );
1009
+ Object.assign(routeParams, strictParams);
1026
1010
  const cause = previousMatch ? "stay" : "enter";
1027
1011
  let match;
1028
1012
  if (existingMatch) {