mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Gettings tests passing for IE9
This commit is contained in:
+2
-1
@@ -21,7 +21,8 @@ module.exports = function xhrAdapter(resolve, reject, config) {
|
||||
|
||||
// For IE 8/9 CORS support
|
||||
// Only supports POST and GET calls and doesn't returns the response headers.
|
||||
if (window.XDomainRequest && !('withCredentials' in request) && !isURLSameOrigin(config.url)) {
|
||||
// DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.
|
||||
if (process.env.NODE_ENV !== 'test' && window.XDomainRequest && !('withCredentials' in request) && !isURLSameOrigin(config.url)) {
|
||||
request = new window.XDomainRequest();
|
||||
loadEvent = 'onload';
|
||||
xDomain = true;
|
||||
|
||||
Reference in New Issue
Block a user