@tanstack/router-core 1.121.39 → 1.121.40
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 +4 -2
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/esm/router.js +4 -2
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/router.ts +9 -2
package/package.json
CHANGED
package/src/router.ts
CHANGED
|
@@ -1790,8 +1790,15 @@ export class RouterCore<
|
|
|
1790
1790
|
location: this.latestLocation,
|
|
1791
1791
|
pendingMatches,
|
|
1792
1792
|
// If a cached moved to pendingMatches, remove it from cachedMatches
|
|
1793
|
-
cachedMatches: s.cachedMatches.filter((
|
|
1794
|
-
|
|
1793
|
+
cachedMatches: s.cachedMatches.filter((cachedMatch) => {
|
|
1794
|
+
const pendingMatch = pendingMatches.find((e) => e.id === cachedMatch.id)
|
|
1795
|
+
|
|
1796
|
+
if (!pendingMatch) return true
|
|
1797
|
+
|
|
1798
|
+
return (
|
|
1799
|
+
cachedMatch.status === 'success' &&
|
|
1800
|
+
(cachedMatch.isFetching || cachedMatch.loaderData !== undefined)
|
|
1801
|
+
)
|
|
1795
1802
|
}),
|
|
1796
1803
|
}))
|
|
1797
1804
|
}
|