Skip to content

Commit

Permalink
Update util.js
Browse files Browse the repository at this point in the history
Co-authored-by: tsctx <91457664+tsctx@users.noreply.github.com>
  • Loading branch information
mertcanaltin and tsctx committed Apr 13, 2024
1 parent c977df5 commit 8de7eb3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/web/fetch/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,8 @@ async function fullyReadBody (body, processBody, processBodyError) {
const errorSteps = processBodyError

if (typeof body.source === 'string') {
successSteps(new TextEncoder().encode(body.source))
const buffer = new TextEncoder().encode(body.source)
successSteps(Buffer.from(buffer.buffer, buffer.byteOffset, buffer.byteLength))
return
}

Expand Down

0 comments on commit 8de7eb3

Please sign in to comment.