diff --git a/src/isomorphic/classic/types/checkReactTypeSpec.js b/src/isomorphic/classic/types/checkReactTypeSpec.js index a5aa145940f45..104f69dc4422e 100644 --- a/src/isomorphic/classic/types/checkReactTypeSpec.js +++ b/src/isomorphic/classic/types/checkReactTypeSpec.js @@ -88,8 +88,8 @@ function checkReactTypeSpec(typeSpecs, values, location, componentName, element, componentStackInfo ); } - if (mismatched.includes(typeSpecName.toLowerCase())) { - const mismatch = mismatched.find(item => item === typeSpecName.toLowerCase()); + if (mismatched.indexOf(typeSpecName.toLowerCase()) !== -1) { + const mismatch = mismatched[mismatched.indexOf(typeSpecName.toLowerCase())]; warning( false, 'Provided prop %s is not defined in propTypes, did you mean %s?',