MOBILE-3320 runtime: Ignore invalid nodes in find

main
Noel De Martin 2021-05-06 13:06:25 +02:00
parent 778298a455
commit d7593ab5c1
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;
}