Backing out fix for #6481.
This commit is contained in:
parent
a519129e99
commit
ce7b311b92
2 changed files with 5 additions and 17 deletions
13
src/ajax.js
13
src/ajax.js
|
@ -772,7 +772,7 @@ jQuery.extend({
|
|||
});
|
||||
|
||||
function buildParams( prefix, obj, traditional, add ) {
|
||||
if ( jQuery.isArray( obj ) && obj.length ) {
|
||||
if ( jQuery.isArray( obj ) ) {
|
||||
// Serialize array item.
|
||||
jQuery.each( obj, function( i, v ) {
|
||||
if ( traditional || rbracket.test( prefix ) ) {
|
||||
|
@ -792,16 +792,9 @@ function buildParams( prefix, obj, traditional, add ) {
|
|||
});
|
||||
|
||||
} else if ( !traditional && obj != null && typeof obj === "object" ) {
|
||||
// If we see an array here, it is empty and should be treated as an empty
|
||||
// object
|
||||
if ( jQuery.isArray( obj ) || jQuery.isEmptyObject( obj ) ) {
|
||||
add( prefix, "" );
|
||||
|
||||
// Serialize object item.
|
||||
} else {
|
||||
for ( var name in obj ) {
|
||||
buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
|
||||
}
|
||||
for ( var name in obj ) {
|
||||
buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue