Skip to content

Commit

Permalink
fix null body issue
Browse files Browse the repository at this point in the history
  • Loading branch information
terrablue committed Jan 27, 2024
1 parent b40fe58 commit ede84fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/primate/src/hooks/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import errors from "../errors.js";
const deslash = url => url.replaceAll(/(?<!http:)\/{2,}/gu, _ => "/");

const parse_body = (request, url) =>
tryreturn(async _ => Body.parse(request) ?? {})
tryreturn(async _ => await Body.parse(request) ?? {})
.orelse(error => errors.MismatchedBody.throw(url.pathname, error.message));

export default dispatch => async original => {
Expand Down

0 comments on commit ede84fc

Please sign in to comment.