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