diff --git a/lib/rules/prop-types.js b/lib/rules/prop-types.js index a2918b7e57..ec909f2792 100644 --- a/lib/rules/prop-types.js +++ b/lib/rules/prop-types.js @@ -46,7 +46,7 @@ module.exports = function(context) { // Special case for class properties // (babel-eslint does not expose property name so we have to rely on tokens) - if (node.type === 'ClassProperty') { + if (node && node.type === 'ClassProperty') { var tokens = context.getFirstTokens(node, 2); if ( tokens[0].value === 'propTypes' ||