Fixes #7568. Follow-up fix for #5862. Objects with a length property weren't serialized properly by jQuery.param.

This commit is contained in:
Anton M 2011-01-31 15:58:27 +01:00
parent 4e97543051
commit 389c099df6
2 changed files with 31 additions and 13 deletions

View file

@ -736,9 +736,9 @@ function buildParams( prefix, obj, traditional, add ) {
// Serialize object item.
} else {
jQuery.each( obj, function( k, v ) {
buildParams( prefix + "[" + k + "]", v, traditional, add );
});
for ( var name in obj ) {
buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
}
}
} else {