diff --git a/packages/server/src/uwebsockets.ts b/packages/server/src/uwebsockets.ts index ea9124d9558..f5da7a6febf 100644 --- a/packages/server/src/uwebsockets.ts +++ b/packages/server/src/uwebsockets.ts @@ -43,7 +43,7 @@ export function getRequestFromUWSRequest({ req, res, fetchAPI }: GetRequestFromU }); let multipleChunks = false; res.onData(function (ab, isLast) { - const chunk = Buffer.from(chunk, 0, chunk.byteLength); + const chunk = Buffer.from(ab, 0, ab.byteLength); if (!multipleChunks && isLast) { readable.push(chunk); } else {