Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Use null as request body if options.body is undefined
This fixes an issue with IE11 http delete when body is missing.
(See also: axios/axios#248)
  • Loading branch information
khusa committed Aug 2, 2018
commit 588bddb7c1a4d6546b4fd8ccd303e26e5cb1f6bf
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export default typeof fetch=='function' ? fetch.bind() : function(url, options)

request.onerror = reject;

request.send(options.body);
let requestBody = typeof options.body !== 'undefined' ? options.body : null;
request.send(requestBody);

function response() {
let keys = [],
Expand Down