@tanstack/react-router 1.52.2 → 1.52.4
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/route.cjs +0 -17
- package/dist/cjs/route.cjs.map +1 -1
- package/dist/cjs/router.cjs +1 -4
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/esm/route.js +0 -17
- package/dist/esm/route.js.map +1 -1
- package/dist/esm/router.js +1 -4
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/route.ts +8 -8
- package/src/router.ts +1 -5
package/package.json
CHANGED
package/src/route.ts
CHANGED
|
@@ -887,35 +887,35 @@ export class Route<
|
|
|
887
887
|
private _to!: TrimPathRight<TFullPath>
|
|
888
888
|
|
|
889
889
|
public get to() {
|
|
890
|
-
invariant(
|
|
890
|
+
/* invariant(
|
|
891
891
|
this._to,
|
|
892
892
|
`trying to access property 'to' on a route which is not initialized yet. Route properties are only available after 'createRouter' completed.`,
|
|
893
|
-
)
|
|
893
|
+
)*/
|
|
894
894
|
return this._to
|
|
895
895
|
}
|
|
896
896
|
|
|
897
897
|
public get id() {
|
|
898
|
-
invariant(
|
|
898
|
+
/* invariant(
|
|
899
899
|
this._id,
|
|
900
900
|
`trying to access property 'id' on a route which is not initialized yet. Route properties are only available after 'createRouter' completed.`,
|
|
901
|
-
)
|
|
901
|
+
)*/
|
|
902
902
|
return this._id
|
|
903
903
|
}
|
|
904
904
|
|
|
905
905
|
public get path() {
|
|
906
|
-
invariant(
|
|
906
|
+
/* invariant(
|
|
907
907
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
908
908
|
this.isRoot || this._id || this._path,
|
|
909
909
|
`trying to access property 'path' on a route which is not initialized yet. Route properties are only available after 'createRouter' completed.`,
|
|
910
|
-
)
|
|
910
|
+
)*/
|
|
911
911
|
return this._path
|
|
912
912
|
}
|
|
913
913
|
|
|
914
914
|
public get fullPath() {
|
|
915
|
-
invariant(
|
|
915
|
+
/* invariant(
|
|
916
916
|
this._fullPath,
|
|
917
917
|
`trying to access property 'fullPath' on a route which is not initialized yet. Route properties are only available after 'createRouter' completed.`,
|
|
918
|
-
)
|
|
918
|
+
)*/
|
|
919
919
|
return this._fullPath
|
|
920
920
|
}
|
|
921
921
|
|
package/src/router.ts
CHANGED
|
@@ -1643,11 +1643,6 @@ export class Router<
|
|
|
1643
1643
|
load = async (): Promise<void> => {
|
|
1644
1644
|
this.latestLocation = this.parseLocation(this.latestLocation)
|
|
1645
1645
|
|
|
1646
|
-
this.__store.setState((s) => ({
|
|
1647
|
-
...s,
|
|
1648
|
-
loadedAt: Date.now(),
|
|
1649
|
-
}))
|
|
1650
|
-
|
|
1651
1646
|
let redirect: ResolvedRedirect | undefined
|
|
1652
1647
|
let notFound: NotFoundError | undefined
|
|
1653
1648
|
|
|
@@ -1738,6 +1733,7 @@ export class Router<
|
|
|
1738
1733
|
return {
|
|
1739
1734
|
...s,
|
|
1740
1735
|
isLoading: false,
|
|
1736
|
+
loadedAt: Date.now(),
|
|
1741
1737
|
matches: newMatches,
|
|
1742
1738
|
pendingMatches: undefined,
|
|
1743
1739
|
cachedMatches: [
|