Skip to content
This repository has been archived by the owner on Mar 17, 2020. It is now read-only.

Commit

Permalink
Stronger type checking
Browse files Browse the repository at this point in the history
el.tagName returns a string, so better to check type and equality by changing '==' to '==='
  • Loading branch information
chiester committed Sep 30, 2014
1 parent aeb2e17 commit f5008e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@

function getSVGNode(el) {
el = el.node()
if(el.tagName.toLowerCase() == 'svg')
if(el.tagName.toLowerCase() === 'svg')
return el

return el.ownerSVGElement
Expand Down Expand Up @@ -290,4 +290,4 @@
return tip
};

}));
}));

0 comments on commit f5008e7

Please sign in to comment.