@tanstack/react-router 0.0.1-beta.260 → 0.0.1-beta.261
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/build/cjs/router.js +5 -4
- package/build/cjs/router.js.map +1 -1
- package/build/esm/index.js +5 -4
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +353 -353
- package/build/umd/index.development.js +5 -4
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +2 -2
- package/src/router.ts +5 -3
|
@@ -2425,13 +2425,13 @@
|
|
|
2425
2425
|
pendingMatches: s.pendingMatches?.map(d => d.id === match.id ? match : d)
|
|
2426
2426
|
}));
|
|
2427
2427
|
};
|
|
2428
|
-
const abortController = new AbortController();
|
|
2429
2428
|
|
|
2430
2429
|
// Check each match middleware to see if the route can be accessed
|
|
2431
2430
|
try {
|
|
2432
2431
|
for (let [index, match] of matches.entries()) {
|
|
2433
2432
|
const parentMatch = matches[index - 1];
|
|
2434
2433
|
const route = this.looseRoutesById[match.routeId];
|
|
2434
|
+
const abortController = new AbortController();
|
|
2435
2435
|
const handleErrorAndRedirect = (err, code) => {
|
|
2436
2436
|
err.routerCode = code;
|
|
2437
2437
|
firstBadMatchIndex = firstBadMatchIndex ?? index;
|
|
@@ -2451,7 +2451,7 @@
|
|
|
2451
2451
|
error: err,
|
|
2452
2452
|
status: 'error',
|
|
2453
2453
|
updatedAt: Date.now(),
|
|
2454
|
-
abortController
|
|
2454
|
+
abortController: new AbortController()
|
|
2455
2455
|
};
|
|
2456
2456
|
};
|
|
2457
2457
|
try {
|
|
@@ -2464,7 +2464,7 @@
|
|
|
2464
2464
|
const parentContext = parentMatch?.context ?? this.options.context ?? {};
|
|
2465
2465
|
const beforeLoadContext = (await route.options.beforeLoad?.({
|
|
2466
2466
|
search: match.search,
|
|
2467
|
-
abortController
|
|
2467
|
+
abortController,
|
|
2468
2468
|
params: match.params,
|
|
2469
2469
|
preload: !!preload,
|
|
2470
2470
|
context: parentContext,
|
|
@@ -2486,7 +2486,8 @@
|
|
|
2486
2486
|
};
|
|
2487
2487
|
matches[index] = match = {
|
|
2488
2488
|
...match,
|
|
2489
|
-
context: replaceEqualDeep(match.context, context)
|
|
2489
|
+
context: replaceEqualDeep(match.context, context),
|
|
2490
|
+
abortController
|
|
2490
2491
|
};
|
|
2491
2492
|
} catch (err) {
|
|
2492
2493
|
handleErrorAndRedirect(err, 'BEFORE_LOAD');
|