We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a38286d commit 452353dCopy full SHA for 452353d
packages/react-router/src/cloudflare/index.ts
@@ -23,17 +23,17 @@ export function injectTraceMetaTags(body: ReadableStream): ReadableStream {
23
return;
24
}
25
26
+ const encoder = new TextEncoder();
27
const html = value instanceof Uint8Array ? new TextDecoder().decode(value) : String(value);
28
29
if (html.includes(headClosingTag)) {
30
const modifiedHtml = html.replace(headClosingTag, `${getTraceMetaTags()}${headClosingTag}`);
31
- const encoder = new TextEncoder();
32
controller.enqueue(encoder.encode(modifiedHtml));
33
34
35
36
- controller.enqueue(value);
+ controller.enqueue(encoder.encode(html));
37
},
38
});
39
0 commit comments