@tanstack/react-router 1.77.3 → 1.77.5
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/Transitioner.cjs +3 -3
- package/dist/cjs/Transitioner.cjs.map +1 -1
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/cjs/router.d.cts +2 -2
- package/dist/esm/Transitioner.js +3 -3
- package/dist/esm/Transitioner.js.map +1 -1
- package/dist/esm/router.d.ts +2 -2
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/Transitioner.tsx +3 -3
- package/src/router.ts +2 -2
package/package.json
CHANGED
package/src/Transitioner.tsx
CHANGED
|
@@ -84,7 +84,7 @@ export function Transitioner() {
|
|
|
84
84
|
if (previousIsLoading && !routerState.isLoading) {
|
|
85
85
|
const toLocation = router.state.location
|
|
86
86
|
const fromLocation = router.state.resolvedLocation
|
|
87
|
-
const pathChanged = fromLocation.
|
|
87
|
+
const pathChanged = fromLocation.pathname !== toLocation.pathname
|
|
88
88
|
|
|
89
89
|
router.emit({
|
|
90
90
|
type: 'onLoad', // When the new URL has committed, when the new matches have been loaded into state.matches
|
|
@@ -100,7 +100,7 @@ export function Transitioner() {
|
|
|
100
100
|
if (previousIsPagePending && !isPagePending) {
|
|
101
101
|
const toLocation = router.state.location
|
|
102
102
|
const fromLocation = router.state.resolvedLocation
|
|
103
|
-
const pathChanged = fromLocation.
|
|
103
|
+
const pathChanged = fromLocation.pathname !== toLocation.pathname
|
|
104
104
|
|
|
105
105
|
router.emit({
|
|
106
106
|
type: 'onBeforeRouteMount',
|
|
@@ -116,7 +116,7 @@ export function Transitioner() {
|
|
|
116
116
|
if (previousIsAnyPending && !isAnyPending) {
|
|
117
117
|
const toLocation = router.state.location
|
|
118
118
|
const fromLocation = router.state.resolvedLocation
|
|
119
|
-
const pathChanged = fromLocation.
|
|
119
|
+
const pathChanged = fromLocation.pathname !== toLocation.pathname
|
|
120
120
|
|
|
121
121
|
router.emit({
|
|
122
122
|
type: 'onResolved',
|
package/src/router.ts
CHANGED
|
@@ -2560,7 +2560,7 @@ export class Router<
|
|
|
2560
2560
|
return matches
|
|
2561
2561
|
}
|
|
2562
2562
|
|
|
2563
|
-
invalidate = <TRouter extends AnyRouter =
|
|
2563
|
+
invalidate = <TRouter extends AnyRouter = typeof this>(opts?: {
|
|
2564
2564
|
filter?: (d: MakeRouteMatchUnion<TRouter>) => boolean
|
|
2565
2565
|
}) => {
|
|
2566
2566
|
const invalidate = (d: MakeRouteMatch<TRouteTree>) => {
|
|
@@ -2596,7 +2596,7 @@ export class Router<
|
|
|
2596
2596
|
return redirect
|
|
2597
2597
|
}
|
|
2598
2598
|
|
|
2599
|
-
clearCache = <TRouter extends AnyRouter =
|
|
2599
|
+
clearCache = <TRouter extends AnyRouter = typeof this>(opts?: {
|
|
2600
2600
|
filter?: (d: MakeRouteMatchUnion<TRouter>) => boolean
|
|
2601
2601
|
}) => {
|
|
2602
2602
|
const filter = opts?.filter
|