Skip to content

Commit 93cbbe7

Browse files
committed
Merge pull request jsx-eslint#187 from xjamundx/patch-1
Fix object rest/spread handling
2 parents 13fa214 + 87a42c9 commit 93cbbe7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rules/prop-types.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module.exports = function(context) {
4646

4747
// Special case for class properties
4848
// (babel-eslint does not expose property name so we have to rely on tokens)
49-
if (node.type === 'ClassProperty') {
49+
if (node && node.type === 'ClassProperty') {
5050
var tokens = context.getFirstTokens(node, 2);
5151
if (
5252
tokens[0].value === 'propTypes' ||

0 commit comments

Comments
 (0)