Make sure that null params aren't traversed. Fixes #5794.

This commit is contained in:
jeresig 2010-01-13 09:29:01 -05:00
parent 23492fdf9f
commit 05aaa33957
2 changed files with 4 additions and 3 deletions

View file

@ -665,7 +665,7 @@ jQuery.extend({
}
});
} else if ( !traditional && typeof obj === "object" ) {
} else if ( !traditional && obj != null && typeof obj === "object" ) {
// Serialize object item.
jQuery.each( obj, function( k, v ) {
buildParams( prefix + "[" + k + "]", v );