@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.
@@ -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((d) => {
509
- return !pendingMatches.find((e) => e.id === d.id);
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
  };