aboutsummaryrefslogtreecommitdiffstats
path: root/src/serialize.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/serialize.js')
-rw-r--r--src/serialize.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/serialize.js b/src/serialize.js
index 30fcf98cc..44d3606b3 100644
--- a/src/serialize.js
+++ b/src/serialize.js
@@ -70,6 +70,10 @@ jQuery.param = function( a, traditional ) {
encodeURIComponent( value == null ? "" : value );
};
+ if ( a == null ) {
+ return "";
+ }
+
// If an array was passed in, assume that it is an array of form elements.
if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {