Stop webcomponent labels disappearing

This commit is contained in:
nathan 2022-07-29 08:57:36 -06:00
parent 0141cba334
commit c3a8d40914

View File

@ -842,7 +842,7 @@ const Et2WidgetMixin = <T extends Constructor>(superClass : T) =>
// An empty text node causes problems with legacy widget children
// It throws off their insertion indexing, making them get added in the wrong place
if(this.childNodes[0]?.nodeType == this.TEXT_NODE)
if(this.childNodes[0]?.nodeType == this.TEXT_NODE && this.childNodes[0].textContent == "")
{
this.removeChild(this.childNodes[0]);
}