Skip to content

Commit

Permalink
fix issue with io.js and IE10
Browse files Browse the repository at this point in the history
for some reason request.timeout = 0 generates an InvalidStateError in IE10
  • Loading branch information
greggman committed Oct 25, 2014
1 parent 990d763 commit 9ab5bc4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions public/hft/0.x.x/scripts/io.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ define(function() {
request.overrideMimeType('text/plain');
}
var timeout = option.timeout || 0;
request.timeout = timeout;
log("set timeout to: " + request.timeout);
if (timeout) {
request.timeout = timeout;
log("set timeout to: " + request.timeout);
}
request.open('POST', url, true);
var js = JSON.stringify(jsonObject);
var callCallback = function(error, json) {
Expand Down

0 comments on commit 9ab5bc4

Please sign in to comment.