Skip to content

Commit

Permalink
fix(@angular/ssr): resolve bootstrap is not a function error
Browse files Browse the repository at this point in the history
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
  • Loading branch information
alan-agius4 committed Sep 12, 2024
1 parent 056d17a commit 85df401
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/angular/ssr/src/routes/ng-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,8 @@ export async function extractRoutesAndCreateRouteTree(
): Promise<RouteTree> {
const routeTree = new RouteTree();
const document = await new ServerAssets(manifest).getIndexServerHtml();
const { baseHref, routes } = await getRoutesFromAngularRouterConfig(
await manifest.bootstrap(),
document,
url,
);
const bootstrap = await manifest.bootstrap();
const { baseHref, routes } = await getRoutesFromAngularRouterConfig(bootstrap, document, url);

for (let { route, redirectTo } of routes) {
route = joinUrlParts(baseHref, route);
Expand Down

0 comments on commit 85df401

Please sign in to comment.