From 1f57c0ca64eacfef65aee490cbdbbb7b36d42ab9 Mon Sep 17 00:00:00 2001 From: matthewp Date: Tue, 18 Oct 2022 13:54:56 +0000 Subject: [PATCH] [ci] format --- examples/ssr/src/pages/login.astro | 11 ++++------- .../astro/src/vite-plugin-astro-server/index.ts | 16 ++++++++-------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/examples/ssr/src/pages/login.astro b/examples/ssr/src/pages/login.astro index 45643665e..51ad74008 100644 --- a/examples/ssr/src/pages/login.astro +++ b/examples/ssr/src/pages/login.astro @@ -27,12 +27,9 @@ import Container from '../components/Container.astro'; }) .then((res) => res.json()) .then((data) => { - document.querySelector("#result").innerHTML = "Progressive login was successful! you will be redirected to the store in 3 seconds"; - setTimeout( - () => location.href = "/", - 3000 - ); - + document.querySelector('#result').innerHTML = + 'Progressive login was successful! you will be redirected to the store in 3 seconds'; + setTimeout(() => (location.href = '/'), 3000); }); }); }); @@ -52,7 +49,7 @@ import Container from '../components/Container.astro'; -
+
diff --git a/packages/astro/src/vite-plugin-astro-server/index.ts b/packages/astro/src/vite-plugin-astro-server/index.ts index 049dc4615..34707b084 100644 --- a/packages/astro/src/vite-plugin-astro-server/index.ts +++ b/packages/astro/src/vite-plugin-astro-server/index.ts @@ -378,14 +378,14 @@ async function handleRoute( if (computedMimeType) { contentType = computedMimeType; } - const response = new Response(result.body, { - status: 200, - headers: { - 'Content-Type': `${contentType};charset=utf-8`, - }, - }); - attachToResponse(response, result.cookies); - await writeWebResponse(res, response); + const response = new Response(result.body, { + status: 200, + headers: { + 'Content-Type': `${contentType};charset=utf-8`, + }, + }); + attachToResponse(response, result.cookies); + await writeWebResponse(res, response); } } else { const result = await renderPage(options);