Commit 9cbd67e
committed
Fix crash in no-access-state-in-setstate
With an IIFE in the return statement of render that uses `this.state`,
there is no parent with a name. In this rule, the method names are later
checked to see if they are being called elsewhere in the file. Since
there is no intention of this being called anywhere else, the IIFE will
just be skipped being added to the list of methods.1 parent f06db3d commit 9cbd67e
File tree
2 files changed
+19
-1
lines changed- lib/rules
- tests/lib/rules
2 files changed
+19
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
49 | 67 | | |
50 | 68 | | |
51 | 69 | | |
| |||
0 commit comments