mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 13:00:42 +00:00
Fix fetch body type error by returning ArrayBuffer from compression helper
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user