Skip to content

Commit

Permalink
fix(esl-utils): fix IE issue 'ShadowRoot is undefined'
Browse files Browse the repository at this point in the history
  • Loading branch information
dshovchko committed Aug 6, 2021
1 parent 7533683 commit 4a8cffc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/esl-utils/dom/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function getParentNode(element: Element | ShadowRoot): Node {
return element;
}

return (ShadowRoot
return (window.ShadowRoot
? element instanceof ShadowRoot
? element.host
: element.assignedSlot || element.parentNode
Expand Down

0 comments on commit 4a8cffc

Please sign in to comment.