@tanstack/react-router 1.104.0 → 1.104.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/route.cjs.map +1 -1
- package/dist/cjs/route.d.cts +1 -1
- package/dist/cjs/router.cjs +16 -16
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/esm/route.d.ts +1 -1
- package/dist/esm/route.js.map +1 -1
- package/dist/esm/router.js +16 -16
- package/dist/esm/router.js.map +1 -1
- package/package.json +3 -3
- package/src/route.ts +1 -1
- package/src/router.ts +17 -18
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/react-router",
|
|
3
|
-
"version": "1.104.
|
|
3
|
+
"version": "1.104.1",
|
|
4
4
|
"description": "Modern and scalable routing for React applications",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"jsesc": "^3.1.0",
|
|
54
54
|
"tiny-invariant": "^1.3.3",
|
|
55
55
|
"tiny-warning": "^1.0.3",
|
|
56
|
-
"@tanstack/
|
|
57
|
-
"@tanstack/
|
|
56
|
+
"@tanstack/history": "1.99.13",
|
|
57
|
+
"@tanstack/router-core": "^1.104.1"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@testing-library/jest-dom": "^6.6.3",
|
package/src/route.ts
CHANGED
|
@@ -459,7 +459,7 @@ export interface UpdatableRouteOptions<
|
|
|
459
459
|
TLoaderDeps
|
|
460
460
|
>
|
|
461
461
|
params: ResolveAllParamsFromParent<TParentRoute, TParams>
|
|
462
|
-
loaderData: ResolveLoaderData<TLoaderFn>
|
|
462
|
+
loaderData: ResolveLoaderData<TLoaderFn>
|
|
463
463
|
}) => {
|
|
464
464
|
links?: AnyRouteMatch['links']
|
|
465
465
|
scripts?: AnyRouteMatch['scripts']
|
package/src/router.ts
CHANGED
|
@@ -1318,15 +1318,6 @@ export class Router<
|
|
|
1318
1318
|
}
|
|
1319
1319
|
}
|
|
1320
1320
|
|
|
1321
|
-
// If it's already a success, update the headers
|
|
1322
|
-
// These may get updated again if the match is refreshed
|
|
1323
|
-
// due to being stale
|
|
1324
|
-
if (match.status === 'success') {
|
|
1325
|
-
match.headers = route.options.headers?.({
|
|
1326
|
-
loaderData: match.loaderData,
|
|
1327
|
-
})
|
|
1328
|
-
}
|
|
1329
|
-
|
|
1330
1321
|
if (!opts?.preload) {
|
|
1331
1322
|
// If we have a global not found, mark the right match as global not found
|
|
1332
1323
|
match.globalNotFound = globalNotFoundRouteId === route.id
|
|
@@ -1380,16 +1371,24 @@ export class Router<
|
|
|
1380
1371
|
}
|
|
1381
1372
|
}
|
|
1382
1373
|
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1374
|
+
// If it's already a success, update headers and head content
|
|
1375
|
+
// These may get updated again if the match is refreshed
|
|
1376
|
+
// due to being stale
|
|
1377
|
+
if (match.status === 'success') {
|
|
1378
|
+
match.headers = route.options.headers?.({
|
|
1379
|
+
loaderData: match.loaderData,
|
|
1380
|
+
})
|
|
1381
|
+
const headFnContent = route.options.head?.({
|
|
1382
|
+
matches,
|
|
1383
|
+
match,
|
|
1384
|
+
params: match.params,
|
|
1385
|
+
loaderData: match.loaderData,
|
|
1386
|
+
})
|
|
1389
1387
|
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1388
|
+
match.links = headFnContent?.links
|
|
1389
|
+
match.scripts = headFnContent?.scripts
|
|
1390
|
+
match.meta = headFnContent?.meta
|
|
1391
|
+
}
|
|
1393
1392
|
})
|
|
1394
1393
|
|
|
1395
1394
|
return matches
|