Skip to content
Permalink
Browse files

Make sure oldAbort is only called if the xhr object still exists.

  • Loading branch information
jeresig committed Jan 12, 2010
1 parent 6776920 commit 61983cbf176c599687c36ffbf4b64ae8697486a3
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/ajax.js
@@ -455,9 +455,8 @@ jQuery.extend({
try {
var oldAbort = xhr.abort;
xhr.abort = function() {
oldAbort.call( xhr );

if ( xhr ) {
oldAbort.call( xhr );

This comment has been minimized.

Copy link
@vjt

vjt Mar 27, 2010

Hi, as reported in this ticket this code doesn't work on IE because .call () is not defined in the .abort () handler of the native XHR object, but a plain oldAbort () does the job on IE.

xhr.readyState = 0;
}

1 comment on commit 61983cb

@vjt

This comment has been minimized.

Copy link

vjt commented on 61983cb Mar 27, 2010

Hi, as I reported in this ticket, this code doesn't work on IE because .call () is not defined in the .abort () function of the XHR object, but the old function can be called via a plain oldAbort ().

Please sign in to comment.
You can’t perform that action at this time.