Avoid removing all event listeners if the etemplate has no unique ID (happens for dialogs)

This commit is contained in:
Nathan Gray 2014-01-11 11:42:23 +00:00
parent d94fc6b492
commit 26b8cae767

View File

@ -116,7 +116,10 @@ etemplate2.prototype.resize = function()
etemplate2.prototype.clear = function()
{
// Remove any handlers on window (resize)
$j(window).off("."+this.uniqueId);
if(this.uniqueId)
{
$j(window).off("."+this.uniqueId);
}
if (this.widgetContainer != null)
{