From 6524e589bbc6bd25a27984dc8690655ef14adb56 Mon Sep 17 00:00:00 2001 From: Luke Page Date: Fri, 26 Jul 2019 13:53:14 +0200 Subject: [PATCH] bugfix --- lib/util/propTypes.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/util/propTypes.js b/lib/util/propTypes.js index ab9a330768..8e9e85b669 100644 --- a/lib/util/propTypes.js +++ b/lib/util/propTypes.js @@ -548,6 +548,8 @@ module.exports = function propTypesInstructions(context, components, utils) { case 'GenericTypeAnnotation': if (propTypes.id.name === '$ReadOnly') { ignorePropsValidation = declarePropTypesForObjectTypeAnnotation(propTypes.typeParameters.params[0], declaredPropTypes); + } else { + ignorePropsValidation = true; } break; case null: