aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2011-02-15 21:47:52 +0100
committerjaubourg <j@ubourg.net>2011-02-15 21:53:38 +0100
commit1ddfdabbb983e2d3bf7f7200a3da5051f274e6fe (patch)
tree8452ff64ac288486092ee947495c9905685391fb /src
parent8e40a84c24271c0a9253902ceb97185f243a3318 (diff)
downloadjquery-1ddfdabbb983e2d3bf7f7200a3da5051f274e6fe.tar.gz
jquery-1ddfdabbb983e2d3bf7f7200a3da5051f274e6fe.zip
Fixes #8277. Sets data to undefined rather than null when it is not provided in ajax helpers so that it won't revent data set in ajaxSettings from being used. Unit test added.
Diffstat (limited to 'src')
-rw-r--r--src/ajax.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ajax.js b/src/ajax.js
index 7ef8dec18..76a2dc812 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -164,7 +164,7 @@ jQuery.fn.extend({
if ( jQuery.isFunction( params ) ) {
// We assume that it's the callback
callback = params;
- params = null;
+ params = undefined;
// Otherwise, build a param string
} else if ( typeof params === "object" ) {
@@ -256,7 +256,7 @@ jQuery.each( [ "get", "post" ], function( i, method ) {
if ( jQuery.isFunction( data ) ) {
type = type || callback;
callback = data;
- data = null;
+ data = undefined;
}
return jQuery.ajax({
@@ -272,7 +272,7 @@ jQuery.each( [ "get", "post" ], function( i, method ) {
jQuery.extend({
getScript: function( url, callback ) {
- return jQuery.get( url, null, callback, "script" );
+ return jQuery.get( url, undefined, callback, "script" );
},
getJSON: function( url, data, callback ) {