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

Commit f5008e7

Browse files
committed
Stronger type checking
el.tagName returns a string, so better to check type and equality by changing '==' to '==='
1 parent aeb2e17 commit f5008e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@
236236

237237
function getSVGNode(el) {
238238
el = el.node()
239-
if(el.tagName.toLowerCase() == 'svg')
239+
if(el.tagName.toLowerCase() === 'svg')
240240
return el
241241

242242
return el.ownerSVGElement
@@ -290,4 +290,4 @@
290290
return tip
291291
};
292292

293-
}));
293+
}));

0 commit comments

Comments
 (0)