Skip to content

Commit

Permalink
🏁 ie does not support document.contains (umijs#1016)
Browse files Browse the repository at this point in the history
Co-authored-by: gongshun <[email protected]>
  • Loading branch information
gongshun and gongshun authored Oct 22, 2020
1 parent 3d89ed1 commit bcd5f27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export function isEnableScopedCSS(sandbox: FrameworkConfiguration['sandbox']) {
*/
export function getXPathForElement(el: Node, document: Document): string | void {
// not support that if el not existed in document yet(such as it not append to document before it mounted)
if (!document.contains(el)) {
if (!document.body.contains(el)) {
return undefined;
}

Expand Down

0 comments on commit bcd5f27

Please sign in to comment.