mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 07:09:20 +01:00
Avoid errors removing top-level widgets, check for parent property first
This commit is contained in:
parent
555de8e540
commit
0285ea4b28
@ -233,8 +233,8 @@ var et2_widget = Class.extend(
|
|||||||
this._children[i].free();
|
this._children[i].free();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove this element from the parent
|
// Remove this element from the parent, if it exists
|
||||||
if (this._parent !== null)
|
if (typeof this._parent != "undefined" && this._parent !== null)
|
||||||
{
|
{
|
||||||
this._parent.removeChild(this);
|
this._parent.removeChild(this);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user