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 = {
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 ||
......
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