Skip to content

Commit

Permalink
fix: DOMEventHandler does not crash in edge cases (#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladitasev authored Sep 12, 2019
1 parent 6b35980 commit 2576883
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/base/src/DOMEventHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const dispatchEvent = function dispatchEvent(element, event) {
const getParentDOMNode = function getParentDOMNode(node) {
const parentNode = node.parentNode;

if (parentNode && parentNode.host) {
if (parentNode && (parentNode instanceof window.ShadowRoot) && parentNode.host) {
return parentNode.host;
}

Expand Down

0 comments on commit 2576883

Please sign in to comment.