We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 13fa214 + 87a42c9 commit 93cbbe7Copy full SHA for 93cbbe7
lib/rules/prop-types.js
@@ -46,7 +46,7 @@ module.exports = function(context) {
46
47
// Special case for class properties
48
// (babel-eslint does not expose property name so we have to rely on tokens)
49
- if (node.type === 'ClassProperty') {
+ if (node && node.type === 'ClassProperty') {
50
var tokens = context.getFirstTokens(node, 2);
51
if (
52
tokens[0].value === 'propTypes' ||
0 commit comments