aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/core.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/core.js b/src/core.js
index 27cdbfe1f..56a2b1f1c 100644
--- a/src/core.js
+++ b/src/core.js
@@ -410,9 +410,7 @@ jQuery.fn = jQuery.prototype = {
jQuery.inArray(this.name, value) >= 0);
else if ( jQuery.nodeName( this, "select" ) ) {
- var values = value.constructor == Array ?
- value :
- [ value ];
+ var values = jQuery.makeArray(value);
jQuery( "option", this ).each(function(){
this.selected = (jQuery.inArray( this.value, values ) >= 0 ||