mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Fix #10466. jQuery.param() should treat object-wrapped primitives as primitives.
This commit is contained in:
committed by
Dave Methvin
parent
6c2a501de4
commit
166b9d252a
@@ -818,7 +818,7 @@ function buildParams( prefix, obj, traditional, add ) {
|
||||
}
|
||||
});
|
||||
|
||||
} else if ( !traditional && obj != null && typeof obj === "object" ) {
|
||||
} else if ( !traditional && jQuery.isPlainObject( obj ) ) {
|
||||
// Serialize object item.
|
||||
for ( var name in obj ) {
|
||||
buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
|
||||
|
||||
Reference in New Issue
Block a user