@tanstack/react-router 1.15.15 → 1.15.16
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/Matches.cjs.map +1 -1
- package/dist/cjs/Matches.d.cts +1 -0
- package/dist/cjs/router.cjs +12 -6
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/esm/Matches.d.ts +1 -0
- package/dist/esm/Matches.js.map +1 -1
- package/dist/esm/router.js +12 -6
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/Matches.tsx +1 -0
- package/src/router.ts +9 -3
package/src/router.ts
CHANGED
|
@@ -1370,9 +1370,14 @@ export class Router<
|
|
|
1370
1370
|
|
|
1371
1371
|
if ((latestPromise = checkLatest())) return await latestPromise
|
|
1372
1372
|
|
|
1373
|
-
const meta = await
|
|
1374
|
-
|
|
1375
|
-
|
|
1373
|
+
const [meta, headers] = await Promise.all([
|
|
1374
|
+
route.options.meta?.({
|
|
1375
|
+
loaderData,
|
|
1376
|
+
}),
|
|
1377
|
+
route.options.headers?.({
|
|
1378
|
+
loaderData,
|
|
1379
|
+
}),
|
|
1380
|
+
])
|
|
1376
1381
|
|
|
1377
1382
|
matches[index] = match = {
|
|
1378
1383
|
...match,
|
|
@@ -1383,6 +1388,7 @@ export class Router<
|
|
|
1383
1388
|
loaderData,
|
|
1384
1389
|
loadPromise: undefined,
|
|
1385
1390
|
meta,
|
|
1391
|
+
headers,
|
|
1386
1392
|
}
|
|
1387
1393
|
} catch (error) {
|
|
1388
1394
|
if ((latestPromise = checkLatest())) return await latestPromise
|