diff --git a/lib/adapters/xhr.js b/lib/adapters/xhr.js index 6cbce35..462ba5b 100644 --- a/lib/adapters/xhr.js +++ b/lib/adapters/xhr.js @@ -24,7 +24,8 @@ module.exports = function xhrAdapter(config) { // For IE 8/9 CORS support // Only supports POST and GET calls and doesn't returns the response headers. // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest. - if (process.env.NODE_ENV !== 'test' && + if (!window.XMLHttpRequest && + process.env.NODE_ENV !== 'test' && typeof window !== 'undefined' && window.XDomainRequest && !('withCredentials' in request) && !isURLSameOrigin(config.url)) {