From f5008e7609e5d05ef126867d3a7ca258f004bf45 Mon Sep 17 00:00:00 2001 From: Chris Hiester Date: Tue, 30 Sep 2014 03:16:07 -0400 Subject: [PATCH] Stronger type checking el.tagName returns a string, so better to check type and equality by changing '==' to '===' --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 8c9f4e0..ad97551 100644 --- a/index.js +++ b/index.js @@ -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 @@ -290,4 +290,4 @@ return tip }; -})); \ No newline at end of file +}));