Skip to content

Commit 28a33dc

Browse files
hampustagerudljharb
authored andcommitted
[Fix] jsx-max-depth: finding JSX element in newer @typescript-eslint/parser versions
1 parent 6a36b44 commit 28a33dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rules/jsx-max-depth.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ module.exports = {
9191
function findJSXElementOrFragment(startNode, name, previousReferences) {
9292
function find(refs, prevRefs) {
9393
for (let i = refs.length - 1; i >= 0; i--) {
94-
if (has(refs[i], 'writeExpr')) {
94+
if (typeof refs[i].writeExpr !== 'undefined') {
9595
const writeExpr = refs[i].writeExpr;
9696

9797
return (jsxUtil.isJSX(writeExpr)

0 commit comments

Comments
 (0)