@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/dist/cjs/router.cjs +1 -1
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/cjs/router.d.cts +1 -1
- package/dist/esm/router.d.ts +1 -1
- package/dist/esm/router.js +1 -1
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/router.ts +8 -2
package/package.json
CHANGED
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,
|