Skip to content

Commit

Permalink
refactor(utils/body): shorten the code (#3353)
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukebe authored Sep 1, 2024
1 parent e4cc5aa commit 7593e75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ export const parseBody: ParseBody = async (
const contentType = headers.get('Content-Type')

if (
(contentType !== null && contentType.startsWith('multipart/form-data')) ||
(contentType !== null && contentType.startsWith('application/x-www-form-urlencoded'))
contentType?.startsWith('multipart/form-data') ||
contentType?.startsWith('application/x-www-form-urlencoded')
) {
return parseFormData(request, { all, dot })
}
Expand Down

0 comments on commit 7593e75

Please sign in to comment.