@tanstack/router-core 1.130.6 → 1.130.7
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 +7 -7
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/esm/router.js +7 -7
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/router.ts +7 -7
package/dist/esm/router.js
CHANGED
|
@@ -541,7 +541,7 @@ class RouterCore {
|
|
|
541
541
|
pendingMatches,
|
|
542
542
|
// If a cached moved to pendingMatches, remove it from cachedMatches
|
|
543
543
|
cachedMatches: s.cachedMatches.filter(
|
|
544
|
-
(d) => !pendingMatches.
|
|
544
|
+
(d) => !pendingMatches.some((e) => e.id === d.id)
|
|
545
545
|
)
|
|
546
546
|
}));
|
|
547
547
|
};
|
|
@@ -587,13 +587,13 @@ class RouterCore {
|
|
|
587
587
|
const previousMatches = s.matches;
|
|
588
588
|
const newMatches = s.pendingMatches || s.matches;
|
|
589
589
|
exitingMatches = previousMatches.filter(
|
|
590
|
-
(match) => !newMatches.
|
|
590
|
+
(match) => !newMatches.some((d) => d.id === match.id)
|
|
591
591
|
);
|
|
592
592
|
enteringMatches = newMatches.filter(
|
|
593
|
-
(match) => !previousMatches.
|
|
593
|
+
(match) => !previousMatches.some((d) => d.id === match.id)
|
|
594
594
|
);
|
|
595
595
|
stayingMatches = previousMatches.filter(
|
|
596
|
-
(match) => newMatches.
|
|
596
|
+
(match) => newMatches.some((d) => d.id === match.id)
|
|
597
597
|
);
|
|
598
598
|
return {
|
|
599
599
|
...s,
|
|
@@ -722,9 +722,9 @@ class RouterCore {
|
|
|
722
722
|
}
|
|
723
723
|
};
|
|
724
724
|
const resolvePreload = (matchId) => {
|
|
725
|
-
return !!(allPreload && !this.state.matches.
|
|
725
|
+
return !!(allPreload && !this.state.matches.some((d) => d.id === matchId));
|
|
726
726
|
};
|
|
727
|
-
if (!this.isServer && this.state.matches.
|
|
727
|
+
if (!this.isServer && this.state.matches.some((d) => d._forcePending)) {
|
|
728
728
|
triggerOnReady();
|
|
729
729
|
}
|
|
730
730
|
const handleRedirectAndNotFound = (match, err) => {
|
|
@@ -1074,7 +1074,7 @@ class RouterCore {
|
|
|
1074
1074
|
updateMatch(matchId, (prev) => ({
|
|
1075
1075
|
...prev,
|
|
1076
1076
|
loaderPromise: createControlledPromise(),
|
|
1077
|
-
preload: !!preload && !this.state.matches.
|
|
1077
|
+
preload: !!preload && !this.state.matches.some((d) => d.id === matchId)
|
|
1078
1078
|
}));
|
|
1079
1079
|
const runLoader = async () => {
|
|
1080
1080
|
var _a2, _b2, _c2, _d2;
|