diff --git a/.changeset/khaki-tables-remember.md b/.changeset/khaki-tables-remember.md new file mode 100644 index 000000000..5ce7873d9 --- /dev/null +++ b/.changeset/khaki-tables-remember.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Prevent hydration mismatch in streaming SSR diff --git a/packages/astro/src/runtime/server/render/common.ts b/packages/astro/src/runtime/server/render/common.ts index b8a998a4a..9274210f5 100644 --- a/packages/astro/src/runtime/server/render/common.ts +++ b/packages/astro/src/runtime/server/render/common.ts @@ -69,7 +69,7 @@ export class HTMLParts { } toArrayBuffer() { this.parts.forEach((part, i) => { - if (typeof part === 'string') { + if(!ArrayBuffer.isView(part)) { this.parts[i] = encoder.encode(String(part)); } });