@tanstack/router-core 1.117.0 → 1.117.1
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 +2 -5
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/esm/router.js +2 -5
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/router.ts +7 -9
package/dist/cjs/router.cjs
CHANGED
|
@@ -840,9 +840,6 @@ class RouterCore {
|
|
|
840
840
|
const resolvePreload = (matchId) => {
|
|
841
841
|
return !!(allPreload && !this.state.matches.find((d) => d.id === matchId));
|
|
842
842
|
};
|
|
843
|
-
if (!this.isServer && !this.state.matches.length) {
|
|
844
|
-
triggerOnReady();
|
|
845
|
-
}
|
|
846
843
|
const handleRedirectAndNotFound = (match, err) => {
|
|
847
844
|
var _a, _b, _c, _d;
|
|
848
845
|
if (redirect.isResolvedRedirect(err)) {
|
|
@@ -923,7 +920,7 @@ class RouterCore {
|
|
|
923
920
|
const parentMatchId = (_a = matches[index - 1]) == null ? void 0 : _a.id;
|
|
924
921
|
const route = this.looseRoutesById[routeId];
|
|
925
922
|
const pendingMs = route.options.pendingMs ?? this.options.defaultPendingMs;
|
|
926
|
-
const shouldPending = !!(onReady && !this.isServer && !resolvePreload(matchId) && (route.options.loader || route.options.beforeLoad) && typeof pendingMs === "number" && pendingMs !== Infinity && (route.options.pendingComponent ?? ((_b = this.options) == null ? void 0 : _b.defaultPendingComponent)));
|
|
923
|
+
const shouldPending = !!(onReady && !this.isServer && !resolvePreload(matchId) && (route.options.loader || route.options.beforeLoad || routeNeedsPreload(route)) && typeof pendingMs === "number" && pendingMs !== Infinity && (route.options.pendingComponent ?? ((_b = this.options) == null ? void 0 : _b.defaultPendingComponent)));
|
|
927
924
|
let executeBeforeLoad = true;
|
|
928
925
|
if (
|
|
929
926
|
// If we are in the middle of a load, either of these will be present
|
|
@@ -1111,6 +1108,7 @@ class RouterCore {
|
|
|
1111
1108
|
const headers = (_h = (_g = route.options).headers) == null ? void 0 : _h.call(_g, {
|
|
1112
1109
|
loaderData
|
|
1113
1110
|
});
|
|
1111
|
+
await route._componentsPromise;
|
|
1114
1112
|
updateMatch(matchId, (prev) => ({
|
|
1115
1113
|
...prev,
|
|
1116
1114
|
error: void 0,
|
|
@@ -1148,7 +1146,6 @@ class RouterCore {
|
|
|
1148
1146
|
router: this,
|
|
1149
1147
|
match: this.getMatch(matchId)
|
|
1150
1148
|
});
|
|
1151
|
-
await route._componentsPromise;
|
|
1152
1149
|
} catch (err) {
|
|
1153
1150
|
updateMatch(matchId, (prev) => ({
|
|
1154
1151
|
...prev,
|