Merge pull request #15 from NoelDeMartin/MOBILE-3320
MOBILE-3320 runtime: Ignore invalid nodes in findmain
commit
deba3d153a
|
@ -292,7 +292,13 @@
|
||||||
|
|
||||||
if (currentNode.shadowRoot) {
|
if (currentNode.shadowRoot) {
|
||||||
for (const childNode of currentNode.shadowRoot.childNodes) {
|
for (const childNode of currentNode.shadowRoot.childNodes) {
|
||||||
if (!childNode) {
|
if (
|
||||||
|
!(childNode instanceof HTMLElement) || (
|
||||||
|
childNode instanceof HTMLStyleElement ||
|
||||||
|
childNode instanceof HTMLLinkElement ||
|
||||||
|
childNode instanceof HTMLScriptElement
|
||||||
|
)
|
||||||
|
) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue