diff --git a/lib/rules/forbid-component-props.js b/lib/rules/forbid-component-props.js index 4218112cb3..8d6ba9f9b3 100644 --- a/lib/rules/forbid-component-props.js +++ b/lib/rules/forbid-component-props.js @@ -48,7 +48,7 @@ module.exports = { return { JSXAttribute: function(node) { var tag = node.parent.name.name; - if (tag[0] !== tag[0].toUpperCase()) { + if (tag && tag[0] !== tag[0].toUpperCase()) { // This is a DOM node, not a Component, so exit. return; }