]> source.dussan.org Git - jquery.git/commitdiff
Fix fix for #6481 introduced at 7862c45ad2f32096383a21b8b301155787724476 which did...
authorColin Snover <github.com@zetafleet.com>
Thu, 23 Dec 2010 00:54:22 +0000 (18:54 -0600)
committerColin Snover <github.com@zetafleet.com>
Thu, 23 Dec 2010 00:54:22 +0000 (18:54 -0600)
src/ajax.js

index da130faed407be1fdcbd80496d1955f9d059cfeb..3f4f732bd30a2aaaa3c45e172b7741e9a3843fb8 100644 (file)
@@ -343,7 +343,9 @@ function buildParams( prefix, obj, traditional, add ) {
                });
                        
        } else if ( !traditional && obj != null && typeof obj === "object" ) {
-               if ( jQuery.isEmptyObject( obj ) ) {
+               // 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.