@tanstack/router-core 1.168.7 → 1.168.9

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.168.7",
3
+ "version": "1.168.9",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -1002,7 +1002,7 @@ export async function loadMatches(arg: {
1002
1002
  break
1003
1003
  }
1004
1004
 
1005
- if (inner.serialError) {
1005
+ if (inner.serialError || inner.firstBadMatchIndex != null) {
1006
1006
  break
1007
1007
  }
1008
1008
  }
@@ -1057,9 +1057,10 @@ export async function loadMatches(arg: {
1057
1057
  firstNotFound ??
1058
1058
  (beforeLoadNotFound && !inner.preload ? beforeLoadNotFound : undefined)
1059
1059
 
1060
- let headMaxIndex = inner.serialError
1061
- ? (inner.firstBadMatchIndex ?? 0)
1062
- : inner.matches.length - 1
1060
+ let headMaxIndex =
1061
+ inner.firstBadMatchIndex !== undefined
1062
+ ? inner.firstBadMatchIndex
1063
+ : inner.matches.length - 1
1063
1064
 
1064
1065
  if (!notFoundToThrow && beforeLoadNotFound && inner.preload) {
1065
1066
  return inner.matches
package/src/router.ts CHANGED
@@ -1279,7 +1279,7 @@ export class RouterCore<
1279
1279
 
1280
1280
  return {
1281
1281
  href: pathname + searchStr + hash,
1282
- publicHref: href,
1282
+ publicHref: pathname + searchStr + hash,
1283
1283
  pathname: decodePath(pathname).path,
1284
1284
  external: false,
1285
1285
  searchStr,