@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/dist/cjs/router.cjs
CHANGED
|
@@ -505,8 +505,10 @@ class RouterCore {
|
|
|
505
505
|
location: this.latestLocation,
|
|
506
506
|
pendingMatches,
|
|
507
507
|
// If a cached moved to pendingMatches, remove it from cachedMatches
|
|
508
|
-
cachedMatches: s.cachedMatches.filter((
|
|
509
|
-
|
|
508
|
+
cachedMatches: s.cachedMatches.filter((cachedMatch) => {
|
|
509
|
+
const pendingMatch = pendingMatches.find((e) => e.id === cachedMatch.id);
|
|
510
|
+
if (!pendingMatch) return true;
|
|
511
|
+
return cachedMatch.status === "success" && (cachedMatch.isFetching || cachedMatch.loaderData !== void 0);
|
|
510
512
|
})
|
|
511
513
|
}));
|
|
512
514
|
};
|