Skip to content

Commit

Permalink
fix rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Jun 13, 2023
1 parent efee31a commit 457cedb
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions packages/astro/src/core/render/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export type RenderPage = {
isCompressHTML?: boolean;
};

export async function renderPage({ mod, renderContext, env,isCompressHTML = false, }: RenderPage) {
export async function renderPage({ mod, renderContext, env, isCompressHTML = false }: RenderPage) {
if (routeIsRedirect(renderContext.route)) {
return new Response(null, {
status: redirectRouteStatus(renderContext.route, renderContext.request.method),
Expand All @@ -126,15 +126,6 @@ export async function renderPage({ mod, renderContext, env,isCompressHTML = fals
if (!Component)
throw new Error(`Expected an exported Astro component but received typeof ${typeof Component}`);

if (renderContext.locals) {
if (env.mode === 'development' && !isValueSerializable(renderContext.locals)) {
throw new AstroError({
...AstroErrorData.LocalsNotSerializable,
message: AstroErrorData.LocalsNotSerializable.message(renderContext.pathname),
});
}
}

const result = createResult({
adapterName: env.adapterName,
links: renderContext.links,
Expand All @@ -155,7 +146,7 @@ export async function renderPage({ mod, renderContext, env,isCompressHTML = fals
scripts: renderContext.scripts,
ssr: env.ssr,
status: renderContext.status ?? 200,
cookies: apiContext?.cookies,
cookies: renderContext.cookies,
locals: renderContext.locals ?? {},
});

Expand Down

0 comments on commit 457cedb

Please sign in to comment.