From 1a8c1c2d35ea77a8d439ebd48159a666729e63ff Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 2 Aug 2022 16:37:01 -0600 Subject: [PATCH] Avoid errors that happen if you try to remove a non-element child from a webComponent --- api/js/etemplate/et2_core_widget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/js/etemplate/et2_core_widget.ts b/api/js/etemplate/et2_core_widget.ts index 8a1f71fc32..8f0d1c6f7d 100644 --- a/api/js/etemplate/et2_core_widget.ts +++ b/api/js/etemplate/et2_core_widget.ts @@ -296,7 +296,7 @@ export class et2_widget extends ClassWithAttributes } // Remove this element from the parent, if it exists - if (typeof this._parent != "undefined" && this._parent !== null) + if(typeof this._parent != "undefined" && this._parent !== null && this._parent instanceof et2_widget) { this._parent.removeChild(this); }