@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/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 route.options.meta?.({
1374
- loaderData,
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