From 457cedb40db5286fbd7b797353f23c7f979a0246 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Tue, 13 Jun 2023 16:44:23 +0300 Subject: [PATCH] fix rebase issues --- packages/astro/src/core/render/core.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/packages/astro/src/core/render/core.ts b/packages/astro/src/core/render/core.ts index 86577450b53d..67a1dfcc78ff 100644 --- a/packages/astro/src/core/render/core.ts +++ b/packages/astro/src/core/render/core.ts @@ -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), @@ -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, @@ -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 ?? {}, });