Fix widget.egw() returning null in some cases when widget parent was not completely in widget tree

This commit is contained in:
nathan 2021-12-21 10:45:38 -07:00
parent 7fcf6f1423
commit fa707f0627

View File

@ -766,7 +766,7 @@ const Et2WidgetMixin = (superClass) =>
this._parent.addChild(this); this._parent.addChild(this);
} }
getParent() : HTMLElement | et2_widget getParent() : Et2WidgetClass | et2_widget
{ {
let parentNode = this.parentNode; let parentNode = this.parentNode;
@ -776,7 +776,7 @@ const Et2WidgetMixin = (superClass) =>
return this._parent; return this._parent;
} }
return <HTMLElement>parentNode; return null;
} }
addChild(child : et2_widget | Et2WidgetClass) addChild(child : et2_widget | Et2WidgetClass)