Merge pull request #15 from NoelDeMartin/MOBILE-3320

MOBILE-3320 runtime: Ignore invalid nodes in find
main
Pau Ferrer Ocaña 2021-05-06 13:30:11 +02:00 committed by GitHub
commit deba3d153a
1 changed files with 7 additions and 1 deletions

View File

@ -292,7 +292,13 @@
if (currentNode.shadowRoot) {
for (const childNode of currentNode.shadowRoot.childNodes) {
if (!childNode) {
if (
!(childNode instanceof HTMLElement) || (
childNode instanceof HTMLStyleElement ||
childNode instanceof HTMLLinkElement ||
childNode instanceof HTMLScriptElement
)
) {
continue;
}