Hi!
Just updated my packages and now I get this error from eslint:
Cannot read property 'filter' of undefined
TypeError: Cannot read property 'filter' of undefined
at getPropTypesFromTypeAnnotation (/$PROJECT$/node_modules/eslint-plugin-react/lib/rules/require-default-props.js:167:29)
at handlePropTypeAnnotationClassProperty (/$PROJECT$/node_modules/eslint-plugin-react/lib/rules/require-default-props.js:287:42)
at Object.ClassProperty (/$PROJECT$/node_modules/eslint-plugin-react/lib/rules/require-default-props.js:458:11)
at EventEmitter.updatedRuleInstructions.(anonymous function) (/$PROJECT$/node_modules/eslint-plugin-react/lib/util/Components.js:581:75)
at emitOne (events.js:101:20)
at EventEmitter.emit (events.js:188:7)
at NodeEventGenerator.enterNode (/$PROJECT$/node_modules/eslint/lib/util/node-event-generator.js:39:22)
at CodePathAnalyzer.enterNode (/$PROJECT$/node_modules/eslint/lib/code-path-analysis/code-path-analyzer.js:607:23)
at CommentEventGenerator.enterNode (/$PROJECT$/node_modules/eslint/lib/util/comment-event-generator.js:98:23)
at Controller.enter (/$PROJECT$/node_modules/eslint/lib/eslint.js:928:36)
I manage to fix the problem in react-default-props.js by checking if annotation.properties does exist inside of getPropTypesFromTypeAnnotation-function
Hi!
Just updated my packages and now I get this error from eslint:
My
package.json
looks something like:I manage to fix the problem in
react-default-props.js
by checking ifannotation.properties
does exist inside ofgetPropTypesFromTypeAnnotation
-functionI could send a PR for this fix if you want. But I'm not familiar with the whole codebase to know if it would break somewhere else.
The text was updated successfully, but these errors were encountered: