Skip to content

Commit 85df401

Browse files
committedSep 12, 2024·
fix(@angular/ssr): resolve bootstrap is not a function error
In cases where the application is not zoneless and async/await is downleveled, an issue occurred where `await` was not being downleveled correctly. This led to the `bootstrap is not a function` error. See: https://github.com/angular/angular/actions/runs/10817795242/job/30014914340?pr=57776
1 parent 056d17a commit 85df401

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed
 

‎packages/angular/ssr/src/routes/ng-routes.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,8 @@ export async function extractRoutesAndCreateRouteTree(
276276
): Promise<RouteTree> {
277277
const routeTree = new RouteTree();
278278
const document = await new ServerAssets(manifest).getIndexServerHtml();
279-
const { baseHref, routes } = await getRoutesFromAngularRouterConfig(
280-
await manifest.bootstrap(),
281-
document,
282-
url,
283-
);
279+
const bootstrap = await manifest.bootstrap();
280+
const { baseHref, routes } = await getRoutesFromAngularRouterConfig(bootstrap, document, url);
284281

285282
for (let { route, redirectTo } of routes) {
286283
route = joinUrlParts(baseHref, route);

0 commit comments

Comments
 (0)
Please sign in to comment.