Skip to content

Commit

Permalink
[expect] optimize compare nodes 🎨
Browse files Browse the repository at this point in the history
  • Loading branch information
Connormiha committed Apr 23, 2019
1 parent 4d3c1a1 commit 690c194
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/expect/src/jasmineUtils.ts
Expand Up @@ -127,9 +127,8 @@ function eq(
}

var aIsDomNode = isDomNode(a);
var bIsDomNode = isDomNode(b);
// Use DOM3 method isEqualNode (IE>=9)
if (aIsDomNode && typeof a.isEqualNode === 'function' && bIsDomNode) {
if (aIsDomNode && isDomNode(b)) {
return a.isEqualNode(b);
}

Expand Down

0 comments on commit 690c194

Please sign in to comment.