[Pkg-javascript-commits] [d3-tip.js] 239/277: Stronger type checking

bhuvan krishna bhuvan-guest at moszumanska.debian.org
Thu Dec 8 06:57:35 UTC 2016


This is an automated email from the git hooks/post-receive script.

bhuvan-guest pushed a commit to branch master
in repository d3-tip.js.

commit f5008e7609e5d05ef126867d3a7ca258f004bf45
Author: Chris Hiester <chris.hiester at gmail.com>
Date:   Tue Sep 30 03:16:07 2014 -0400

    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
+}));

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/d3-tip.js.git



More information about the Pkg-javascript-commits mailing list