Make sure prefilters have been called and transport has been selected before sending any global event (in case the "global" option has been changed).
This commit is contained in:
parent
63487505c6
commit
c55a76a23f
1 changed files with 3 additions and 3 deletions
|
@ -532,14 +532,14 @@ jQuery.extend({
|
||||||
s.data = jQuery.param( s.data , s.traditional );
|
s.data = jQuery.param( s.data , s.traditional );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get transport
|
||||||
|
transport = jQuery.ajax.prefilter( s ).transport( s );
|
||||||
|
|
||||||
// Watch for a new set of requests
|
// Watch for a new set of requests
|
||||||
if ( s.global && jQuery.active++ === 0 ) {
|
if ( s.global && jQuery.active++ === 0 ) {
|
||||||
jQuery.event.trigger( "ajaxStart" );
|
jQuery.event.trigger( "ajaxStart" );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get transport
|
|
||||||
transport = jQuery.ajax.prefilter( s ).transport( s );
|
|
||||||
|
|
||||||
// If no transport, we auto-abort
|
// If no transport, we auto-abort
|
||||||
if ( ! transport ) {
|
if ( ! transport ) {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue