Skip to content

Commit

Permalink
return early to prevent further decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatiusmb committed Jul 13, 2021
1 parent e871022 commit 7367c57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/kit/src/core/node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ export function getRawBody(req) {

if (isContentTypeTextual(type)) {
const encoding = h['content-encoding'] || 'utf-8';
fulfil(new TextDecoder(encoding).decode(data));
return fulfil(new TextDecoder(encoding).decode(data));
}

return fulfil(data);
fulfil(data);
});
});
}

0 comments on commit 7367c57

Please sign in to comment.