Browse Source

Fixes #359 again, selected item would not select a falsey value

pull/381/head
jlukic 11 years ago
parent
commit
752672d909
1 changed files with 2 additions and 1 deletions
  1. 3
      src/modules/dropdown.js

3
src/modules/dropdown.js

@ -330,7 +330,7 @@ $.fn.dropdown = function(parameters) {
? module.get.value()
: module.get.text()
;
if(value) {
if(value !== undefined) {
$item
.each(function() {
var
@ -377,6 +377,7 @@ $.fn.dropdown = function(parameters) {
$selectedItem = module.get.item(value),
selectedText
;
console.log(value, $selectedItem);
if($selectedItem) {
module.debug('Setting selected menu item to', $selectedItem);
selectedText = ($selectedItem.data(metadata.text) !== undefined)

Loading…
Cancel
Save