Check for proper type (string) if I want to use string functions

This commit is contained in:
Nathan Gray 2013-07-19 12:38:52 +00:00
parent 36b5590882
commit d2d0fa1fcd

View File

@ -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;
}