Skip to content

Commit 322afa4

Browse files
committed
Use .some() instead of .find()
A hasXXX function should return a boolean instead of an object. I think node 4 supports .some(). - if not, will revert.
1 parent f248800 commit 322afa4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rules/jsx-no-target-blank.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function isTargetBlank(attr) {
1515
}
1616

1717
function hasExternalLink(element) {
18-
return element.attributes.find(function (attr) {
18+
return element.attributes.some(function (attr) {
1919
return attr.name &&
2020
attr.name.name === 'href' &&
2121
attr.value.type === 'Literal' &&

0 commit comments

Comments
 (0)