@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/esm/router.js
CHANGED
|
@@ -838,9 +838,6 @@ class RouterCore {
|
|
|
838
838
|
const resolvePreload = (matchId) => {
|
|
839
839
|
return !!(allPreload && !this.state.matches.find((d) => d.id === matchId));
|
|
840
840
|
};
|
|
841
|
-
if (!this.isServer && !this.state.matches.length) {
|
|
842
|
-
triggerOnReady();
|
|
843
|
-
}
|
|
844
841
|
const handleRedirectAndNotFound = (match, err) => {
|
|
845
842
|
var _a, _b, _c, _d;
|
|
846
843
|
if (isResolvedRedirect(err)) {
|
|
@@ -921,7 +918,7 @@ class RouterCore {
|
|
|
921
918
|
const parentMatchId = (_a = matches[index - 1]) == null ? void 0 : _a.id;
|
|
922
919
|
const route = this.looseRoutesById[routeId];
|
|
923
920
|
const pendingMs = route.options.pendingMs ?? this.options.defaultPendingMs;
|
|
924
|
-
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)));
|
|
921
|
+
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)));
|
|
925
922
|
let executeBeforeLoad = true;
|
|
926
923
|
if (
|
|
927
924
|
// If we are in the middle of a load, either of these will be present
|
|
@@ -1109,6 +1106,7 @@ class RouterCore {
|
|
|
1109
1106
|
const headers = (_h = (_g = route.options).headers) == null ? void 0 : _h.call(_g, {
|
|
1110
1107
|
loaderData
|
|
1111
1108
|
});
|
|
1109
|
+
await route._componentsPromise;
|
|
1112
1110
|
updateMatch(matchId, (prev) => ({
|
|
1113
1111
|
...prev,
|
|
1114
1112
|
error: void 0,
|
|
@@ -1146,7 +1144,6 @@ class RouterCore {
|
|
|
1146
1144
|
router: this,
|
|
1147
1145
|
match: this.getMatch(matchId)
|
|
1148
1146
|
});
|
|
1149
|
-
await route._componentsPromise;
|
|
1150
1147
|
} catch (err) {
|
|
1151
1148
|
updateMatch(matchId, (prev) => ({
|
|
1152
1149
|
...prev,
|