aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ajax.js')
-rw-r--r--src/ajax.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ajax.js b/src/ajax.js
index dc9fb242b..36a9c9b57 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -846,8 +846,9 @@ jQuery.extend( {
jQuery.each( [ "get", "post" ], function( _i, method ) {
jQuery[ method ] = function( url, data, callback, type ) {
- // Shift arguments if data argument was omitted
- if ( typeof data === "function" ) {
+ // Shift arguments if data argument was omitted.
+ // Handle the null callback placeholder.
+ if ( typeof data === "function" || data === null ) {
type = type || callback;
callback = data;
data = undefined;