File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -105,11 +105,6 @@ if ( xhrSupported ) {
105105 }
106106 }
107107
108- // Do send the request
109- // This may raise an exception which is actually
110- // handled in jQuery.ajax (so no try/catch here)
111- xhr . send ( ( options . hasContent && options . data ) || null ) ;
112-
113108 // Listener
114109 callback = function ( _ , isAbort ) {
115110 var status , statusText , responses ;
@@ -168,14 +163,21 @@ if ( xhrSupported ) {
168163 }
169164 } ;
170165
166+ // Do send the request
167+ // `xhr.send` may raise an exception, but it will be
168+ // handled in jQuery.ajax (so no try/catch here)
171169 if ( ! options . async ) {
172170
173- // if we're in sync mode we fire the callback
171+ xhr . send ( ( options . hasContent && options . data ) || null ) ;
172+
173+ // If we're in sync mode we fire the callback
174174 callback ( ) ;
175175 } else {
176176
177177 // Add to the list of active xhr callbacks
178178 xhr . onreadystatechange = callback ;
179+
180+ xhr . send ( ( options . hasContent && options . data ) || null ) ;
179181 }
180182 } ,
181183
You can’t perform that action at this time.
0 commit comments