File tree 1 file changed +7
-7
lines changed
packages/next/src/server/stream-utils
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -413,16 +413,16 @@ function createStripDocumentClosingTagsTransform(): TransformStream<
413
413
isEquivalentUint8Arrays ( chunk , ENCODED_TAGS . CLOSED . BODY ) ||
414
414
isEquivalentUint8Arrays ( chunk , ENCODED_TAGS . CLOSED . HTML )
415
415
) {
416
- // the entire chunk is the closing tags.
416
+ // the entire chunk is the closing tags; return without enqueueing anything .
417
417
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 )
424
418
}
425
419
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
+
426
426
controller . enqueue ( chunk )
427
427
} ,
428
428
} )
You can’t perform that action at this time.
0 commit comments