mirror of
https://github.com/withastro/astro.git
synced 2025-01-20 22:12:38 -05:00
Fix rendering TextEncoder encoding error regression (#7777)
This commit is contained in:
parent
0c9959704f
commit
3567afac44
2 changed files with 8 additions and 2 deletions
5
.changeset/dry-cycles-appear.md
Normal file
5
.changeset/dry-cycles-appear.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'astro': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix rendering TextEncoder encoding error regression
|
|
@ -124,7 +124,8 @@ export function chunkToByteArray(
|
||||||
if (ArrayBuffer.isView(chunk)) {
|
if (ArrayBuffer.isView(chunk)) {
|
||||||
return chunk as Uint8Array;
|
return chunk as Uint8Array;
|
||||||
} else {
|
} else {
|
||||||
// stringify chunk might return a HTMLString
|
// `stringifyChunk` might return a HTMLString, call `.toString()` to really ensure it's a string
|
||||||
return encoder.encode(stringifyChunk(result, chunk));
|
const stringified = stringifyChunk(result, chunk);
|
||||||
|
return encoder.encode(stringified.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue