Skip to content

Commit b0971ab

Browse files
authored
fix(resolveSuperParameterPropsType): add null check
fix #2179
1 parent 5a60432 commit b0971ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/util/propTypes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ module.exports = function propTypesInstructions(context, components, utils) {
612612
annotation = annotation.typeAnnotation;
613613
}
614614

615-
if (annotation.type === 'GenericTypeAnnotation' && getInTypeScope(annotation.id.name)) {
615+
if (annotation && annotation.type === 'GenericTypeAnnotation' && getInTypeScope(annotation.id.name)) {
616616
return getInTypeScope(annotation.id.name);
617617
}
618618
return annotation;

0 commit comments

Comments
 (0)