X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fajax.js;h=d02d33135a4e38804bb6284308e5ff858373fdc5;hb=77344f4c50386690782ab8ddc92898a918f54f5c;hp=55fc25d14cb1893a4779563660a450c1c4262e11;hpb=ab551c2b14ac6b0511cf3da10ca224ce461a0f10;p=jquery.git diff --git a/src/ajax.js b/src/ajax.js index 55fc25d..d02d331 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -393,11 +393,12 @@ jQuery.extend({ setTimeout(function(){ // Check to see if the request is still happening if ( xhr ) { - // Cancel the request - xhr.abort(); - if( !requestDone ) onreadystatechange( "timeout" ); + + // Cancel the request + if ( xhr ) + xhr.abort(); } }, s.timeout); }