Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp authored and astrobot-houston committed Sep 21, 2023
1 parent bcad715 commit a576ba9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion packages/astro/src/core/cookies/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
export { AstroCookies } from './cookies.js';
export { attachCookiesToResponse, responseHasCookies, getSetCookiesFromResponse } from './response.js';
export {
attachCookiesToResponse,
getSetCookiesFromResponse,
responseHasCookies,
} from './response.js';
4 changes: 2 additions & 2 deletions packages/astro/src/core/middleware/callMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -112,7 +112,7 @@ export async function callMiddleware<R>(
}

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;
Expand Down

0 comments on commit a576ba9

Please sign in to comment.