Commit 1f92edee authored by Colin Snover's avatar Colin Snover

Fix fix for #6481 introduced at 7862c45a which...

Fix fix for #6481 introduced at 7862c45a which did not like it when Array.prototype was modified on empty arrays.
parent 82ac384b
...@@ -343,7 +343,9 @@ function buildParams( prefix, obj, traditional, add ) { ...@@ -343,7 +343,9 @@ function buildParams( prefix, obj, traditional, add ) {
}); });
} else if ( !traditional && obj != null && typeof obj === "object" ) { } 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, "" ); add( prefix, "" );
// Serialize object item. // Serialize object item.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment