diff --git a/lib/adapters/xhr.js b/lib/adapters/xhr.js index 21badcf..ad94c08 100644 --- a/lib/adapters/xhr.js +++ b/lib/adapters/xhr.js @@ -98,7 +98,7 @@ module.exports = function xhrAdapter(resolve, reject, config) { } // Add headers to the request - if(!xDomain) + if (!xDomain) { utils.forEach(requestHeaders, function (val, key) { // Remove Content-Type if data is undefined if (!data && key.toLowerCase() === 'content-type') { @@ -109,6 +109,7 @@ module.exports = function xhrAdapter(resolve, reject, config) { request.setRequestHeader(key, val); } }); + } // Add withCredentials to request if needed if (config.withCredentials) {