Skip to content

Commit e12f512

Browse files
committed
use cached value in button text method
1 parent 7a9b379 commit e12f512

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/jquery.mobile.forms.select.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
5858

5959
this.button.find( ".ui-btn-text" ).text( function() {
6060
if ( !self.isMultiple ) {
61-
return self.selected().text();
61+
return selected.text();
6262
}
6363

64-
return self.selected().length ? self.selected().map( function() {
64+
return selected.length ? selected.map( function() {
6565
return $( this ).text();
6666
}).get().join( ", " ) : self.placeholder;
6767
});

0 commit comments

Comments
 (0)