diff options
Diffstat (limited to 'src/serialize.js')
-rw-r--r-- | src/serialize.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/serialize.js b/src/serialize.js index a0b948460..9a735fec1 100644 --- a/src/serialize.js +++ b/src/serialize.js @@ -58,7 +58,10 @@ jQuery.param = function( a, traditional ) { add = function( key, value ) { // If value is a function, invoke it and return its value - value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); + value = jQuery.isFunction( value ) ? value() : value; + if ( value == null ) { + value = ""; + } s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); }; |