Skip to content

Commit

Permalink
nit, code format
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan-Arrowood committed Mar 18, 2024
1 parent 44782d6 commit 93c32c8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/next/src/server/stream-utils/node-web-streams-helper.ts
Expand Up @@ -413,16 +413,16 @@ function createStripDocumentClosingTagsTransform(): TransformStream<
isEquivalentUint8Arrays(chunk, ENCODED_TAGS.CLOSED.BODY) ||
isEquivalentUint8Arrays(chunk, ENCODED_TAGS.CLOSED.HTML)
) {
// the entire chunk is the closing tags.
// the entire chunk is the closing tags; return without enqueueing anything.
return
} else {
// 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
chunk = removeFromUint8Array(chunk, ENCODED_TAGS.CLOSED.BODY)
chunk = removeFromUint8Array(chunk, ENCODED_TAGS.CLOSED.HTML)
}

// 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
chunk = removeFromUint8Array(chunk, ENCODED_TAGS.CLOSED.BODY)
chunk = removeFromUint8Array(chunk, ENCODED_TAGS.CLOSED.HTML)

controller.enqueue(chunk)
},
})
Expand Down

0 comments on commit 93c32c8

Please sign in to comment.