Skip to content

Commit 09e71a4

Browse files
fix bug
1 parent 6963258 commit 09e71a4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,6 @@ export function createRootLayoutValidatorStream(): TransformStream<
444444
> {
445445
let foundHtml = false
446446
let foundBody = false
447-
448447
let content = new Uint8Array(0)
449448
return new TransformStream({
450449
async transform(chunk, controller) {
@@ -453,13 +452,13 @@ export function createRootLayoutValidatorStream(): TransformStream<
453452
if (!foundHtml || !foundBody) {
454453
if (
455454
!foundHtml &&
456-
indexOfUint8Array(content, ENCODED_TAGS.OPENING.HTML)
455+
indexOfUint8Array(content, ENCODED_TAGS.OPENING.HTML) > -1
457456
) {
458457
foundHtml = true
459458
}
460459
if (
461460
!foundBody &&
462-
indexOfUint8Array(content, ENCODED_TAGS.OPENING.BODY)
461+
indexOfUint8Array(content, ENCODED_TAGS.OPENING.BODY) > -1
463462
) {
464463
foundBody = true
465464
}

0 commit comments

Comments
 (0)