Permalink
Browse files

fix(rest): don't set body when body===null

  • Loading branch information...
doktordirk committed Aug 12, 2016
1 parent 54abf52 commit 6b061b145f807fa90120807d7e99a2ad85fa1a84
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/rest.js
@@ -45,7 +45,7 @@ export class Rest {

let contentType = requestOptions.headers['Content-Type'] || requestOptions.headers['content-type'];

if (typeof body === 'object' && contentType) {
if (typeof body === 'object' && body !== null && contentType) {
requestOptions.body = contentType.toLowerCase() === 'application/json'
? JSON.stringify(body)
: buildQueryString(body);

0 comments on commit 6b061b1

Please sign in to comment.