Skip to content

Commit

Permalink
fix #1410 - issue with ie and xhr.timeout (#1411)
Browse files Browse the repository at this point in the history
* fix 1410 - issue with ie and xhr.timeout

* update comment
  • Loading branch information
Matt Kendall authored Jul 24, 2017
1 parent 19705b3 commit f8a9778
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export function ajax(url, callback, data, options = {}) {
}
}

x.timeout = _timeout;
if (useXDomainRequest) {
x = new window.XDomainRequest();
x.onload = function () {
Expand Down Expand Up @@ -83,6 +82,8 @@ export function ajax(url, callback, data, options = {}) {
}

x.open(method, url);
// IE needs timoeut to be set after open - see #1410
x.timeout = _timeout;

if (!useXDomainRequest) {
if (options.withCredentials) {
Expand Down

0 comments on commit f8a9778

Please sign in to comment.