Fix fetch body type error by returning ArrayBuffer from compression helper

This commit is contained in:
evanpelle
2025-11-07 19:54:00 -08:00
parent b44dca16e9
commit d332c8bceb
+2 -2
View File
@@ -235,7 +235,7 @@ export class LocalServer {
}
}
async function compress(data: string): Promise<Uint8Array> {
async function compress(data: string): Promise<ArrayBuffer> {
const stream = new CompressionStream("gzip");
const writer = stream.writable.getWriter();
const reader = stream.readable.getReader();
@@ -264,5 +264,5 @@ async function compress(data: string): Promise<Uint8Array> {
offset += chunk.length;
}
return compressedData;
return compressedData.buffer;
}