Skip to content

Commit

Permalink
Update lib/rules/jsx-no-target-blank.js
Browse files Browse the repository at this point in the history
Co-authored-by: Jordan Harband <ljharb@gmail.com>
  • Loading branch information
akulsr0 and ljharb authored Oct 15, 2022
1 parent 4b15b28 commit b91124c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/rules/jsx-no-target-blank.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ function getStringFromValue(value, targetValue) {
const targetTestCond = targetValue.expression.test.name;
const relTestCond = value.expression.test.name;
const targetBlankIndex = [targetValue.expression.consequent.value, targetValue.expression.alternate.value].indexOf('_blank');
if (targetTestCond === relTestCond) return relValues[targetBlankIndex];
if (targetTestCond === relTestCond) {
return relValues[targetBlankIndex];
}
}
return relValues;
}
Expand Down

0 comments on commit b91124c

Please sign in to comment.