Skip to content

Commit

Permalink
Merge pull request #47 from mockservr/fix-body-match
Browse files Browse the repository at this point in the history
Fix body match
  • Loading branch information
tejerka authored Jun 11, 2018
2 parents 57f7e13 + cbf427e commit 76b0e53
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/http-mock-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,11 @@ class HttpMockServer {
let matchBody = true;

if (endpointRequest.body) {
if (!request.body) {
return false;
}
Object.keys(endpointRequest.body).forEach(key => {
if (!request.body[key]) {
if (request.body[key] !== 0 && !request.body[key]) {
matchBody = false;
return;
}
Expand Down

0 comments on commit 76b0e53

Please sign in to comment.