Make sure options are set before looking inside

This commit is contained in:
Nathan Gray 2013-11-18 23:56:25 +00:00
parent 2b7d47fcf7
commit b6f16956f3

View File

@ -259,7 +259,7 @@ var et2_selectbox = et2_inputWidget.extend(
this.input.attr('multiple', true);
this.input.attr('name', this.id + '[]');
if (this.input[0].options[0].value === '')
if (this.input[0].options.length && this.input[0].options[0].value === '')
{
this.input[0].options[0] = null;
}