Convert HTMLString to regular string, preventing hydration script fro… (#4932)
* Convert HTMLString to regular string, preventing hydration script from being missing * Add a changeset
This commit is contained in:
parent
f9261ddd00
commit
9898088c0a
2 changed files with 6 additions and 1 deletions
5
.changeset/khaki-tables-remember.md
Normal file
5
.changeset/khaki-tables-remember.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'astro': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Prevent hydration mismatch in streaming SSR
|
|
@ -69,7 +69,7 @@ export class HTMLParts {
|
||||||
}
|
}
|
||||||
toArrayBuffer() {
|
toArrayBuffer() {
|
||||||
this.parts.forEach((part, i) => {
|
this.parts.forEach((part, i) => {
|
||||||
if (typeof part === 'string') {
|
if(!ArrayBuffer.isView(part)) {
|
||||||
this.parts[i] = encoder.encode(String(part));
|
this.parts[i] = encoder.encode(String(part));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue