Closed
Description
Using latest version 3.13.0, I see several issues when exceptions in jsx-keys when running eslint with our code. Errors 2 & 3 happen after adding if checks to avoid the exceptions. Could not identify code that made 3 happen - no WebStorm call stack :(
- TypeError: Cannot read property 'name' of undefined
line 49 - if (node.callee.property.name !== 'map') { - TypeError: Cannot read property 'type' of undefined
line 54 - var isFn = fn.type === 'FunctionExpression'; - TypeError: Cannot read property 'argument' of undefined
line 64 - getReturnStatement(fn.body.body).argument
Code that caused issues:
class MyComponent extends React.Component { constructor(props) { super(props);//number 1 happens here } var IconRenderer= function() { this.fontsLoaded = false; this.checkFonts = function(loadedCallback) { this.fontsLoaded = lib.fontsLoaded(); if (this.fontsLoaded) { if (loadedCallback) { loadedCallback();//number 2 happens here } }
Metadata
Metadata
Assignees
Labels
No labels