src/html/option.js in envjs-0.3.2 vs src/html/option.js in envjs-0.3.3
- old
+ new
@@ -27,10 +27,10 @@
// select's value which modifies option's selected)
return;
}
HTMLInputCommon.prototype.setAttribute.call(this, 'selected', selectedValue);
var parent = this.parentNode;
- while (parent.tagName === "OPTGROUP") {
+ while (parent && parent.tagName === "OPTGROUP") {
parent = parent.parentNode;
}
if (value) {
// set select's value to this option's value (this also
// unselects previously selected value)