From 267cc7cb93f31c6b595b1dcb69e90b9e410465ae Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 8 Dec 2014 20:02:38 +0000 Subject: [PATCH] Fix multiselect/taglist values not properly set if value is an object instead of an array - Fix to handle strings and nulls too --- etemplate/js/et2_widget_selectbox.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etemplate/js/et2_widget_selectbox.js b/etemplate/js/et2_widget_selectbox.js index b676dda0bc..3784a6f1df 100644 --- a/etemplate/js/et2_widget_selectbox.js +++ b/etemplate/js/et2_widget_selectbox.js @@ -450,7 +450,7 @@ var et2_selectbox = et2_inputWidget.extend( if(this.input !== null && (this.options.tags || this.options.search)) { // Value must be a real Array, not an object - this.input.val(jQuery.map(_value,function(value,index){return [value];})); + this.input.val(typeof _value == 'object' && _value != null ? jQuery.map(_value,function(value,index){return [value];}) : _value); this.input.trigger("liszt:updated"); this.value = this.input.val(); return;