Permalink
Browse files

Fix comparison of <select> value with search value when there is no s…

…earch value.
  • Loading branch information...
atombender committed Jul 26, 2013
1 parent b12d4a4 commit 5feedca735e352688d2715f361c222edbdfea728
Showing with 5 additions and 2 deletions.
  1. +5 −2 js/fn.simplicityFromState.js
@@ -47,8 +47,11 @@
changed = true;
}
} else {
if (element.val() !== searchValue) {
if (element.is('select') && 'undefined' !== typeof searchValue && searchValue !== null) {
if (typeof searchValue == 'undefined') {
searchValue = '';
}
if (element.val() || '' !== searchValue) {
if (element.is('select') && searchValue !== '') {
// Automatically add any missing options to a select input
var options = {};
element.find('option').each(function (idx, option) {

0 comments on commit 5feedca

Please sign in to comment.