From 9ab5bc4da1e7853f6ed5bdb665f65f5fd9275da3 Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Fri, 24 Oct 2014 22:48:20 -0700 Subject: [PATCH] fix issue with io.js and IE10 for some reason request.timeout = 0 generates an InvalidStateError in IE10 --- public/hft/0.x.x/scripts/io.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/hft/0.x.x/scripts/io.js b/public/hft/0.x.x/scripts/io.js index a11df3ac..89b29f3e 100644 --- a/public/hft/0.x.x/scripts/io.js +++ b/public/hft/0.x.x/scripts/io.js @@ -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) {