mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 09:05:16 +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();
|
||||
}
|
||||
|
||||
// Remove this element from the parent
|
||||
if (this._parent !== null)
|
||||
// Remove this element from the parent, if it exists
|
||||
if (typeof this._parent != "undefined" && this._parent !== null)
|
||||
{
|
||||
this._parent.removeChild(this);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user