diff --git a/packages/astro/src/core/cookies/index.ts b/packages/astro/src/core/cookies/index.ts index c55d060c4..c8869f9ae 100644 --- a/packages/astro/src/core/cookies/index.ts +++ b/packages/astro/src/core/cookies/index.ts @@ -1,2 +1,6 @@ export { AstroCookies } from './cookies.js'; -export { attachCookiesToResponse, responseHasCookies, getSetCookiesFromResponse } from './response.js'; +export { + attachCookiesToResponse, + getSetCookiesFromResponse, + responseHasCookies, +} from './response.js'; diff --git a/packages/astro/src/core/middleware/callMiddleware.ts b/packages/astro/src/core/middleware/callMiddleware.ts index bb0871405..40513c152 100644 --- a/packages/astro/src/core/middleware/callMiddleware.ts +++ b/packages/astro/src/core/middleware/callMiddleware.ts @@ -5,9 +5,9 @@ import type { MiddlewareHandler, MiddlewareNext, } from '../../@types/astro.js'; +import { attachCookiesToResponse, responseHasCookies } from '../cookies/index.js'; import { AstroError, AstroErrorData } from '../errors/index.js'; import type { Environment } from '../render/index.js'; -import { attachCookiesToResponse, responseHasCookies } from '../cookies/index.js'; /** * Utility function that is in charge of calling the middleware. @@ -112,7 +112,7 @@ export async function callMiddleware( } function ensureCookiesAttached(apiContext: APIContext, response: Response): Response { - if(apiContext.cookies !== undefined && !responseHasCookies(response)) { + if (apiContext.cookies !== undefined && !responseHasCookies(response)) { attachCookiesToResponse(response, apiContext.cookies); } return response;