Check to make sure search sub-widget is created before trying to use it

This commit is contained in:
Nathan Gray 2013-06-10 22:07:31 +00:00
parent 770ef196fc
commit 7da0e6d27b

View File

@ -88,7 +88,7 @@ var et2_selectAccount = et2_selectbox.extend(
* Tell et2 widget framework where to go
*/
getDOMNode: function(_sender) {
if(_sender == this.search_widget)
if(this.search_widget != null && _sender == this.search_widget)
{
return this.search != null ? this.search[0] : this.search_widget._parent.getDOMNode();
}