Handle values set but not in select_options

This commit is contained in:
Nathan Gray 2014-03-18 14:52:31 +00:00
parent 53f0873583
commit 3f49db5fb9

View File

@ -306,8 +306,14 @@ var et2_taglist = et2_selectbox.extend(
{
// alread in correct format
}
else if (this.options.select_options && typeof this.options.select_options[v] == 'undefined')
else if (this.options.select_options && typeof this.options.select_options[v] == 'undefined' || typeof v == 'string')
{
// Options should have been provided, but they weren't
// This can happen for ajax source with an existing value
if(this.options.select_options == null)
{
this.options.select_options = {};
}
values[i] = {
id: v,
label: v