From 42a0cadd53088d5e8b7e1cd669a0f01cde16a8a0 Mon Sep 17 00:00:00 2001 From: Ethan Arrowood Date: Mon, 18 Mar 2024 16:16:35 -0600 Subject: [PATCH] fix bug --- .../src/server/stream-utils/node-web-streams-helper.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/next/src/server/stream-utils/node-web-streams-helper.ts b/packages/next/src/server/stream-utils/node-web-streams-helper.ts index d0660ad355196..6a44c87d50c5b 100644 --- a/packages/next/src/server/stream-utils/node-web-streams-helper.ts +++ b/packages/next/src/server/stream-utils/node-web-streams-helper.ts @@ -419,13 +419,8 @@ function createStripDocumentClosingTagsTransform(): TransformStream< // We assume these tags will go at together at the end of the document and that // they won't appear anywhere else in the document. This is not really a safe assumption // but until we revamp our streaming infra this is a performant way to string the tags - let transformed = removeFromUint8Array(chunk, ENCODED_TAGS.CLOSED.BODY) - transformed = removeFromUint8Array( - transformed, - ENCODED_TAGS.CLOSED.HTML - ) - - controller.enqueue(transformed) + chunk = removeFromUint8Array(chunk, ENCODED_TAGS.CLOSED.BODY) + chunk = removeFromUint8Array(chunk, ENCODED_TAGS.CLOSED.HTML) } controller.enqueue(chunk)