Skip to content

Commit

Permalink
Don't parse an empty response body
Browse files Browse the repository at this point in the history
  • Loading branch information
mlmorg committed Jun 4, 2013
1 parent d6bfc67 commit fab87e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jquery.batch.js
Expand Up @@ -31,7 +31,9 @@
$.each(data.split('\n'), function (i, response) {
if (response) {
response = JSON.parse(response);
response.body = JSON.parse(response.body);
if (response.body) {
response.body = JSON.parse(response.body);
}
responses.push(response);
}
});
Expand Down

0 comments on commit fab87e1

Please sign in to comment.