Add type assertion to prevent typescript error

This commit is contained in:
Mathieu Plourde
2019-04-14 23:42:12 -04:00
committed by GitHub
parent 39bbc129a0
commit 2432eb643d

View File

@@ -32,7 +32,7 @@ export function isInDOM(node: Node | null): boolean {
if (node === document.body) {
return true;
}
node = node.parentNode || node.host;
node = node.parentNode || (node as ShadowRoot).host;
}
return false;
}