Skip to content

Commit

Permalink
make #newResponse as #method() {} style
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukebe committed Nov 2, 2024
1 parent 3ac8d62 commit 96006d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -623,11 +623,11 @@ export class Context<
return Object.fromEntries(this.#var)
}

#newResponse: NewResponse = (
#newResponse(
data: Data | null,
arg?: StatusCode | ResponseInit,
headers?: HeaderRecord
): Response => {
): Response {
// Optimized
if (this.#isFresh && !headers && !arg && this.#status === 200) {
return new Response(data, {
Expand Down

0 comments on commit 96006d7

Please sign in to comment.