mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
Make sure this.et2 is there before trying to use it.
Fixes type error when closing un-viewed mail tab.
This commit is contained in:
parent
f049892993
commit
2eff897d52
@ -69,12 +69,14 @@ app.classes.mail = AppJS.extend(
|
||||
destroy: function()
|
||||
{
|
||||
// Unbind from nm refresh
|
||||
if(this.et2 != null)
|
||||
{
|
||||
var nm = this.et2.getWidgetById('nm');
|
||||
if(nm != null)
|
||||
{
|
||||
$j(nm).off('refresh');
|
||||
}
|
||||
delete this.et2;
|
||||
}
|
||||
delete this.et2_obj;
|
||||
// call parent
|
||||
this._super.apply(this, arguments);
|
||||
@ -92,7 +94,6 @@ app.classes.mail = AppJS.extend(
|
||||
// call parent; somehow this function is called more often. (twice on a display and compose) why?
|
||||
this._super.apply(this, arguments);
|
||||
this.et2_obj = et2;
|
||||
this.et2 = et2.widgetContainer;
|
||||
var isMainView = false;
|
||||
var isDisplay = false;
|
||||
var isCompose = false;
|
||||
|
Loading…
Reference in New Issue
Block a user