File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
packages/next/src/server/stream-utils Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff 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 } )
You can’t perform that action at this time.
0 commit comments