Skip to content

Commit bd0f08c

Browse files
committed
avoid const
1 parent 82c0250 commit bd0f08c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/astro/src/server/middleware.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,8 @@ async function instrumentRequest(
199199
}
200200
}
201201

202-
const reportedBody = bodyReporter();
203-
204202
try {
205-
for await (const chunk of reportedBody) {
203+
for await (const chunk of bodyReporter()) {
206204
const html = typeof chunk === 'string' ? chunk : decoder.decode(chunk, { stream: true });
207205
const modifiedHtml = addMetaTagToHead(html);
208206
controller.enqueue(new TextEncoder().encode(modifiedHtml));

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy