diff options
author | Rick Waldron <waldron.rick@gmail.com> | 2012-01-12 20:14:51 -0500 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2012-01-12 20:14:51 -0500 |
commit | d8289964788b6d5a31c2f89746c78079fb8a9869 (patch) | |
tree | f280d858977a7ff695dff05413b61089645dcd3c /src/ajax.js | |
parent | 6c8dd7e7d3a00133591d4f9c05c207900234e11e (diff) | |
download | jquery-d8289964788b6d5a31c2f89746c78079fb8a9869.tar.gz jquery-d8289964788b6d5a31c2f89746c78079fb8a9869.zip |
Fix #10978: Let jQuery.param() accept non-native constructed objects.
Diffstat (limited to 'src/ajax.js')
-rw-r--r-- | src/ajax.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ajax.js b/src/ajax.js index 76e9ef443..a07ff6ef3 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -814,11 +814,11 @@ function buildParams( prefix, obj, traditional, add ) { // a server error. Possible fixes are to modify rack's // deserialization algorithm or to provide an option or flag // to force array serialization to be shallow. - buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add ); + buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); } }); - } else if ( !traditional && jQuery.isPlainObject( obj ) ) { + } else if ( !traditional && jQuery.type( obj ) === "object" ) { // Serialize object item. for ( var name in obj ) { buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); |