aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ajax.js')
-rw-r--r--src/ajax.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ajax.js b/src/ajax.js
index 55fc25d14..d02d33135 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);
}