Skip to content

Commit

Permalink
fix prebid#1410 - issue with ie and xhr.timeout (prebid#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 and jbAdyoulike committed Sep 21, 2017
1 parent 283f42a commit 280326c
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 280326c

Please sign in to comment.