From 76ad419420e0de6d4d6e7141a83d152b0d463a4c Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 13 Sep 2021 14:41:36 -0600 Subject: [PATCH] Fix index templates had nextmatch row nodes below the nextmatch --- api/js/etemplate/et2_core_DOMWidget.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/et2_core_DOMWidget.ts b/api/js/etemplate/et2_core_DOMWidget.ts index e82e07b59b..83acbbe592 100644 --- a/api/js/etemplate/et2_core_DOMWidget.ts +++ b/api/js/etemplate/et2_core_DOMWidget.ts @@ -283,9 +283,18 @@ export abstract class et2_DOMWidget extends et2_widget implements et2_IDOMNode } } // _node is actually a Web Component - else if (_node instanceof Element ) + else if(_node instanceof Element) { - this.getDOMNode().append(_node); + if(this.getDOMNode(_node)) + { + this.getDOMNode(_node).append(_node); + } + else + { + // Warn about it. This slows down loading, as it requires a second pass (loadingFinished) to get the child + // properly added. + console.warn("Legacy widget " + this.getType() + "[#" + this.options.id + "] could not handle adding a child. ") + } } }