Skip to content

Commit

Permalink
forgot to use indexOf in place of includes again :(
Browse files Browse the repository at this point in the history
  • Loading branch information
vedadeepta committed Aug 26, 2021
1 parent b385132 commit 9b6289e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/util/propTypes.js
Expand Up @@ -548,7 +548,7 @@ module.exports = function propTypesInstructions(context, components, utils) {
let typeName;
if (astUtil.isTSTypeReference(node)) {
typeName = node.typeName.name;
const shouldTraverseTypeParams = !typeName || allowedGenericTypes.includes(typeName);
const shouldTraverseTypeParams = !typeName || allowedGenericTypes.indexOf(typeName) !== -1;
if (shouldTraverseTypeParams && node.typeParameters && node.typeParameters.length !== 0) {
const nextNode = node.typeParameters.params[0];
this.visitTSNode(nextNode);
Expand Down

0 comments on commit 9b6289e

Please sign in to comment.