Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan-Arrowood committed Mar 18, 2024
1 parent 6963258 commit 09e71a4
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,6 @@ export function createRootLayoutValidatorStream(): TransformStream<
> {
let foundHtml = false
let foundBody = false

let content = new Uint8Array(0)
return new TransformStream({
async transform(chunk, controller) {
Expand All @@ -453,13 +452,13 @@ export function createRootLayoutValidatorStream(): TransformStream<
if (!foundHtml || !foundBody) {
if (
!foundHtml &&
indexOfUint8Array(content, ENCODED_TAGS.OPENING.HTML)
indexOfUint8Array(content, ENCODED_TAGS.OPENING.HTML) > -1
) {
foundHtml = true
}
if (
!foundBody &&
indexOfUint8Array(content, ENCODED_TAGS.OPENING.BODY)
indexOfUint8Array(content, ENCODED_TAGS.OPENING.BODY) > -1
) {
foundBody = true
}
Expand Down

0 comments on commit 09e71a4

Please sign in to comment.