2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-11 18:02:32 +03:00

Update xhr.js

This commit is contained in:
ibci
2017-06-27 13:20:45 -07:00
committed by GitHub
parent 46e275c407
commit e8edb1e29a
+2 -1
View File
@@ -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)) {