Skip to content

Commit

Permalink
[Fix] jsx-max-depth: finding JSX element in newer `@typescript-esli…
Browse files Browse the repository at this point in the history
…nt/parser` versions
  • Loading branch information
hampustagerud authored and ljharb committed Aug 20, 2024
1 parent 6a36b44 commit 28a33dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rules/jsx-max-depth.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ module.exports = {
function findJSXElementOrFragment(startNode, name, previousReferences) {
function find(refs, prevRefs) {
for (let i = refs.length - 1; i >= 0; i--) {
if (has(refs[i], 'writeExpr')) {
if (typeof refs[i].writeExpr !== 'undefined') {
const writeExpr = refs[i].writeExpr;

return (jsxUtil.isJSX(writeExpr)
Expand Down

0 comments on commit 28a33dc

Please sign in to comment.