Skip to content

Commit

Permalink
fix: parse JSON only if string (#721)
Browse files Browse the repository at this point in the history
  • Loading branch information
val-fom authored Feb 17, 2020
1 parent 51af70d commit e214fcb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/http-handler-ssr/src/functions/parseBody.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ export default body => {
try {
return JSON.parse(body);
} catch {
// Do nothing.
return {};
}
}
return {};
return body;
};

0 comments on commit e214fcb

Please sign in to comment.