Commit 3a7b09e5 authored by Ariel Flesler's avatar Ariel Flesler

jquery core: saving some bytes in $.fn.val by using $.makeArray.

parent da76a723
...@@ -410,9 +410,7 @@ jQuery.fn = jQuery.prototype = { ...@@ -410,9 +410,7 @@ jQuery.fn = jQuery.prototype = {
jQuery.inArray(this.name, value) >= 0); jQuery.inArray(this.name, value) >= 0);
else if ( jQuery.nodeName( this, "select" ) ) { else if ( jQuery.nodeName( this, "select" ) ) {
var values = value.constructor == Array ? var values = jQuery.makeArray(value);
value :
[ value ];
jQuery( "option", this ).each(function(){ jQuery( "option", this ).each(function(){
this.selected = (jQuery.inArray( this.value, values ) >= 0 || this.selected = (jQuery.inArray( this.value, values ) >= 0 ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment