From 166b9d252a025009413eee1584dc364996dcb1c2 Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Tue, 6 Dec 2011 16:02:54 -0500 Subject: Fix #10466. jQuery.param() should treat object-wrapped primitives as primitives. --- src/ajax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ajax.js') diff --git a/src/ajax.js b/src/ajax.js index bb64b6863..3a384db64 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -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 ); -- cgit v1.2.3