Skip to content

Commit

Permalink
1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Jun 23, 2014
2 parents 399bfc8 + a5a6ae9 commit 7dc5009
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ var Request = module.exports = function (xhr, params) {
});

xhr.onreadystatechange = function () {
// Fix for IE9 bug
// SCRIPT575: Could not complete the operation due to error c00c023f
// It happens when a request is aborted, calling the success callback anyway with readyState === 4
if (xhr.__aborted) return;
res.handle(xhr);
};
};
Expand All @@ -81,6 +85,7 @@ Request.prototype.write = function (s) {
};

Request.prototype.destroy = function (s) {
this.xhr.__aborted = true;
this.xhr.abort();
this.emit('close');
};
Expand Down

0 comments on commit 7dc5009

Please sign in to comment.