Avoid big scary error if server tries to assign on an unloaded etemplate.

Log a little friendly warning instead.
This commit is contained in:
Nathan Gray 2014-04-01 21:42:06 +00:00
parent 0377dbe076
commit 210dea829b

View File

@ -949,6 +949,12 @@ function etemplate2_handle_assign(type, res, req)
this.etemplate_exec_id = res.data.value; this.etemplate_exec_id = res.data.value;
return true; return true;
} }
if(this.widgetContainer == null)
{
// Right etemplate, but it's already been cleared.
egw.debug('warn', "Tried to call assign on an un-loaded etemplate", res.data);
return false;
}
var widget = this.widgetContainer.getWidgetById(res.data.id); var widget = this.widgetContainer.getWidgetById(res.data.id);
if (widget) if (widget)
{ {