aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2011-04-16 09:12:53 -0700
committerJohn Resig <jeresig@gmail.com>2011-04-16 09:12:53 -0700
commitce7b311b9227e86d7f03c002cbaf1796f8086059 (patch)
tree330bb56b5e726ea1c9b2df497b6b7c2844f645d5 /src
parenta519129e99ba03770e9290961d43fad9f6873a83 (diff)
downloadjquery-ce7b311b9227e86d7f03c002cbaf1796f8086059.tar.gz
jquery-ce7b311b9227e86d7f03c002cbaf1796f8086059.zip
Backing out fix for #6481.
Diffstat (limited to 'src')
-rw-r--r--src/ajax.js13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/ajax.js b/src/ajax.js
index 3048068d0..2a1076391 100644
--- a/src/ajax.js
+++ b/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 {