Permalink
Browse files

Don't fail when select has no options

  • Loading branch information...
1 parent d6a5c1e commit 20dc21b901f3f952405aa693681ee7a2a8ece93c Christian Johansen committed Oct 9, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/select_element.js
@@ -25,7 +25,7 @@ v2.SelectElement = v2.InputElement.extend(/** @scope v2.SelectElement.prototype
var select = this.__elements[0];
if (!select.multiple) {
- return select.options[select.selectedIndex].value;
+ return select.options.length > 0 && select.options[select.selectedIndex].value;
}
var values = [];

0 comments on commit 20dc21b

Please sign in to comment.