From c3a8d40914cd3843337074fa2d137739f9dc6235 Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 29 Jul 2022 08:57:36 -0600 Subject: [PATCH] Stop webcomponent labels disappearing --- api/js/etemplate/Et2Widget/Et2Widget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/js/etemplate/Et2Widget/Et2Widget.ts b/api/js/etemplate/Et2Widget/Et2Widget.ts index 4f686b0d57..a96d8cf901 100644 --- a/api/js/etemplate/Et2Widget/Et2Widget.ts +++ b/api/js/etemplate/Et2Widget/Et2Widget.ts @@ -842,7 +842,7 @@ const Et2WidgetMixin = (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]); }