We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 399bfc8 + a5a6ae9 commit 7dc5009Copy full SHA for 7dc5009
lib/request.js
@@ -58,6 +58,10 @@ var Request = module.exports = function (xhr, params) {
58
});
59
60
xhr.onreadystatechange = function () {
61
+ // Fix for IE9 bug
62
+ // SCRIPT575: Could not complete the operation due to error c00c023f
63
+ // It happens when a request is aborted, calling the success callback anyway with readyState === 4
64
+ if (xhr.__aborted) return;
65
res.handle(xhr);
66
};
67
@@ -81,6 +85,7 @@ Request.prototype.write = function (s) {
81
85
82
86
83
87
Request.prototype.destroy = function (s) {
88
+ this.xhr.__aborted = true;
84
89
this.xhr.abort();
90
this.emit('close');
91
0 commit comments