From d2d0fa1fcd99c3460fa85809fa3963f80596f550 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Fri, 19 Jul 2013 12:38:52 +0000 Subject: [PATCH] Check for proper type (string) if I want to use string functions --- 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 5d610be7cb..d17205c850 100644 --- a/etemplate/js/et2_widget_selectbox.js +++ b/etemplate/js/et2_widget_selectbox.js @@ -166,7 +166,7 @@ var et2_selectbox = et2_inputWidget.extend( // Try first according to ID content_options = this.getArrayMgr("sel_options").getEntry(this.id); // ID can get set to an array with 0 => ' ' - not useful - if(content_options && content_options.length == 1 && typeof content_options[0] != 'undefined' && content_options[0].trim() == '') + if(content_options && content_options.length == 1 && typeof content_options[0] == 'string' && content_options[0].trim() == '') { content_options = null; }