Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed May 5, 2023
1 parent 2e472e8 commit e437f55
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utils/body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ export function readRawBody<E extends Encoding = "utf8">(
(event.node.req as any)[RawBodySymbol] ||
(event.node.req as any).body; /* unjs/unenv #8 */
if (_rawBody) {
const promise = Promise.resolve(_rawBody)
.then(_resolved => Buffer.isBuffer(_resolved) ? _resolved : Buffer.from(_resolved))
const promise = Promise.resolve(_rawBody).then((_resolved) =>
Buffer.isBuffer(_resolved) ? _resolved : Buffer.from(_resolved)
);
return encoding
? promise.then((buff) => buff.toString(encoding))
: (promise as Promise<any>);
Expand Down

0 comments on commit e437f55

Please sign in to comment.