aboutsummaryrefslogtreecommitdiffstats
path: root/src/attributes.js
diff options
context:
space:
mode:
authorColin Snover <github.com@zetafleet.com>2010-10-08 22:48:06 -0500
committerColin Snover <github.com@zetafleet.com>2010-10-08 22:48:06 -0500
commitb03416954d8033e641bd658fb18631699db6cc51 (patch)
tree82320df54f19549937671c1ace3c507f360c803d /src/attributes.js
parenta2aefbf3b198620ae45d2451d21cc5bf96258a7d (diff)
downloadjquery-b03416954d8033e641bd658fb18631699db6cc51.tar.gz
jquery-b03416954d8033e641bd658fb18631699db6cc51.zip
Coerce all array values to strings before comparison in val(). Fixes bug #7123.
Diffstat (limited to 'src/attributes.js')
-rw-r--r--src/attributes.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/attributes.js b/src/attributes.js
index ec4841bd3..147c353f4 100644
--- a/src/attributes.js
+++ b/src/attributes.js
@@ -215,6 +215,10 @@ jQuery.fn.extend({
val = "";
} else if ( typeof val === "number" ) {
val += "";
+ } else if ( jQuery.isArray(val) ) {
+ val = jQuery.map(val, function (value) {
+ return value == null ? "" : value + "";
+ });
}
if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) {