Skip to content

Commit 2576883

Browse files
authored
fix: DOMEventHandler does not crash in edge cases (#774)
1 parent 6b35980 commit 2576883

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/base/src/DOMEventHandler.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const dispatchEvent = function dispatchEvent(element, event) {
4242
const getParentDOMNode = function getParentDOMNode(node) {
4343
const parentNode = node.parentNode;
4444

45-
if (parentNode && parentNode.host) {
45+
if (parentNode && (parentNode instanceof window.ShadowRoot) && parentNode.host) {
4646
return parentNode.host;
4747
}
4848

0 commit comments

Comments
 (0)