Skip to content
Snippets Groups Projects
Verified Commit e2643016 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: host checking

parent 931b0266
No related branches found
No related tags found
No related merge requests found
......@@ -545,12 +545,15 @@ function internalTemplateLookUp(container, key, ref, path) {
const rootNode = container.getRootNode();
if (rootNode instanceof ShadowRoot) {
templateID = rootNode.host.getAttribute(ATTRIBUTE_UPDATER_INSERT_TEMPLATE_ID);
const host = rootNode?.host;
if (host && host.hasAttribute(ATTRIBUTE_UPDATER_INSERT_TEMPLATE_ID)) {
templateID = host.getAttribute(ATTRIBUTE_UPDATER_INSERT_TEMPLATE_ID);
template = findDocumentTemplate(templateID, container);
if (template instanceof HTMLTemplateElement) {
return template;
}
}
}
return findDocumentTemplate(templateID, container);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment