From 3f49db5fb93873ef80e8d3add9d3edf587d29b9e Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 18 Mar 2014 14:52:31 +0000 Subject: [PATCH] Handle values set but not in select_options --- etemplate/js/et2_widget_taglist.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/etemplate/js/et2_widget_taglist.js b/etemplate/js/et2_widget_taglist.js index deb20d7868..d846160564 100644 --- a/etemplate/js/et2_widget_taglist.js +++ b/etemplate/js/et2_widget_taglist.js @@ -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