Skip to content

Commit f1d0bb3

Browse files
committed
debug: does it work serially?
1 parent a5f1810 commit f1d0bb3

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

‎packages/router-core/src/router.ts‎

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2483,11 +2483,20 @@ export class RouterCore<
24832483
loaderData: match.loaderData,
24842484
}
24852485

2486-
return Promise.all([
2487-
route.options.head?.(assetContext),
2488-
route.options.scripts?.(assetContext),
2489-
route.options.headers?.(assetContext),
2490-
]).then(([headFnContent, scripts, headers]) => {
2486+
// DEBUG: this is just for testing purposes, the goal is to use `Promise.all`, not this weird thing
2487+
return Promise.resolve(async () => {
2488+
const headFnContent =
2489+
await route.options.head?.(assetContext)
2490+
const scripts =
2491+
await route.options.scripts?.(assetContext)
2492+
const headers =
2493+
await route.options.headers?.(assetContext)
2494+
2495+
// return Promise.all([
2496+
// route.options.head?.(assetContext),
2497+
// route.options.scripts?.(assetContext),
2498+
// route.options.headers?.(assetContext),
2499+
// ]).then(([headFnContent, scripts, headers]) => {
24912500
const meta = headFnContent?.meta
24922501
const links = headFnContent?.links
24932502
const headScripts = headFnContent?.scripts

0 commit comments

Comments
 (0)