mirror of
https://github.com/honojs/hono.git
synced 2024-11-27 16:06:24 +01:00
refactor(utils/body): shorten the code (#3353)
This commit is contained in:
parent
e4cc5aae73
commit
7593e75aca
@ -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 })
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user