We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e472e8 commit e437f55Copy full SHA for e437f55
src/utils/body.ts
@@ -30,8 +30,9 @@ export function readRawBody<E extends Encoding = "utf8">(
30
(event.node.req as any)[RawBodySymbol] ||
31
(event.node.req as any).body; /* unjs/unenv #8 */
32
if (_rawBody) {
33
- const promise = Promise.resolve(_rawBody)
34
- .then(_resolved => Buffer.isBuffer(_resolved) ? _resolved : Buffer.from(_resolved))
+ const promise = Promise.resolve(_rawBody).then((_resolved) =>
+ Buffer.isBuffer(_resolved) ? _resolved : Buffer.from(_resolved)
35
+ );
36
return encoding
37
? promise.then((buff) => buff.toString(encoding))
38
: (promise as Promise<any>);
0 commit comments