Skip to content

Commit

Permalink
Merge pull request #15 from Automattic/fix/#5
Browse files Browse the repository at this point in the history
Fix TypeError on string body 'error' from rest-proxy
  • Loading branch information
skeltoac authored and sgomes committed Feb 18, 2020
1 parent 91d66fd commit c9f5461
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/wpcom-proxy-request/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ function onmessage (e) {
debug('got %o status code for URL: %o', statusCode, xhr.params.path);
}

if (body && headers) {
if (typeof body === 'object' && headers) {
body._headers = headers;
}

Expand Down

0 comments on commit c9f5461

Please sign in to comment.