aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax.js
diff options
context:
space:
mode:
authortsinha <tsinha@Anthonys-MacBook-Pro.local>2012-04-05 11:06:54 -0400
committerDave Methvin <dave.methvin@gmail.com>2012-04-05 11:06:54 -0400
commit36d2d9ae937f626d98319ed850905e8d1cbfd078 (patch)
treec96851b126dd733afd95a8db2308e3471635670a /src/ajax.js
parentfdf37de77882204cafeba2f10fb5b9915b6e4b93 (diff)
downloadjquery-36d2d9ae937f626d98319ed850905e8d1cbfd078.tar.gz
jquery-36d2d9ae937f626d98319ed850905e8d1cbfd078.zip
Fix #8653, .param() undefined/null values become empty strings
Diffstat (limited to 'src/ajax.js')
-rw-r--r--src/ajax.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ajax.js b/src/ajax.js
index 2da6b0940..3de192766 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -773,7 +773,7 @@ jQuery.extend({
var s = [],
add = function( key, value ) {
// If value is a function, invoke it and return its value
- value = jQuery.isFunction( value ) ? value() : value;
+ value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
};