@tanstack/router-core 1.160.0 → 1.161.1

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.160.0",
3
+ "version": "1.161.1",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
package/src/router.ts CHANGED
@@ -661,7 +661,13 @@ export type PreloadRouteFn<
661
661
  TTo,
662
662
  TMaskFrom,
663
663
  TMaskTo
664
- >,
664
+ > & {
665
+ /**
666
+ * @internal
667
+ * A **trusted** built location that can be used to redirect to.
668
+ */
669
+ _builtLocation?: ParsedLocation
670
+ },
665
671
  ) => Promise<Array<AnyRouteMatch> | undefined>
666
672
 
667
673
  export type MatchRouteFn<
@@ -2757,7 +2763,7 @@ export class RouterCore<
2757
2763
  TDefaultStructuralSharingOption,
2758
2764
  TRouterHistory
2759
2765
  > = async (opts) => {
2760
- const next = this.buildLocation(opts as any)
2766
+ const next = opts._builtLocation ?? this.buildLocation(opts as any)
2761
2767
 
2762
2768
  let matches = this.matchRoutes(next, {
2763
2769
  throwOnError: true,