]> source.dussan.org Git - jquery.git/commitdiff
Attrs: Simplify an option hook
authorOleg <markelog@gmail.com>
Wed, 5 Feb 2014 06:23:49 +0000 (10:23 +0400)
committerOleg <markelog@gmail.com>
Wed, 5 Feb 2014 06:46:00 +0000 (10:46 +0400)
Since getter was removed in fdd78fad19ea3390cd96971cd29430e36378d137
there is no longer a need to wrap option element in order to get its value

Fixes #14756

src/attributes/val.js

index ca5fa08380b6f53ddaf2d0a97cffb0ecf2490f92..6d6b8ea7ca25c50568edaca898f9cbb42f6b4b18 100644 (file)
@@ -117,7 +117,7 @@ jQuery.extend({
 
                                while ( i-- ) {
                                        option = options[ i ];
-                                       if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) {
+                                       if ( (option.selected = jQuery.inArray( option.value, values ) >= 0) ) {
                                                optionSet = true;
                                        }
                                }