Skip to content

Commit 93c32c8

Browse files
nit, code format
1 parent 44782d6 commit 93c32c8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/next/src/server/stream-utils/node-web-streams-helper.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -413,16 +413,16 @@ function createStripDocumentClosingTagsTransform(): TransformStream<
413413
isEquivalentUint8Arrays(chunk, ENCODED_TAGS.CLOSED.BODY) ||
414414
isEquivalentUint8Arrays(chunk, ENCODED_TAGS.CLOSED.HTML)
415415
) {
416-
// the entire chunk is the closing tags.
416+
// the entire chunk is the closing tags; return without enqueueing anything.
417417
return
418-
} else {
419-
// We assume these tags will go at together at the end of the document and that
420-
// they won't appear anywhere else in the document. This is not really a safe assumption
421-
// but until we revamp our streaming infra this is a performant way to string the tags
422-
chunk = removeFromUint8Array(chunk, ENCODED_TAGS.CLOSED.BODY)
423-
chunk = removeFromUint8Array(chunk, ENCODED_TAGS.CLOSED.HTML)
424418
}
425419

420+
// We assume these tags will go at together at the end of the document and that
421+
// they won't appear anywhere else in the document. This is not really a safe assumption
422+
// but until we revamp our streaming infra this is a performant way to string the tags
423+
chunk = removeFromUint8Array(chunk, ENCODED_TAGS.CLOSED.BODY)
424+
chunk = removeFromUint8Array(chunk, ENCODED_TAGS.CLOSED.HTML)
425+
426426
controller.enqueue(chunk)
427427
},
428428
})

0 commit comments

Comments
 (0)