Skip to content

Commit 725b2c1

Browse files
authored
Update getElementType.js
1 parent 3978030 commit 725b2c1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/util/getElementType.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import type { JSXOpeningElement } from 'ast-types-flow';
66
import hasOwn from 'hasown';
7+
import includes from 'array-includes';
78
import { elementType, getProp, getLiteralPropValue } from 'jsx-ast-utils';
89

910
import type { ESLintContext } from '../../flow/eslint';
@@ -20,7 +21,7 @@ const getElementType = (context: ESLintContext): ((node: JSXOpeningElement) => s
2021

2122
let rawType = elementType(node);
2223
if (polymorphicProp) {
23-
if (!polymorphicAllowList || polymorphicAllowList.includes(rawType)) {
24+
if (!polymorphicAllowList || includes(polymorphicAllowList, rawType)) {
2425
rawType = polymorphicProp;
2526
}
2627
}

0 commit comments

Comments
 (0)