We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3978030 commit 725b2c1Copy full SHA for 725b2c1
src/util/getElementType.js
@@ -4,6 +4,7 @@
4
5
import type { JSXOpeningElement } from 'ast-types-flow';
6
import hasOwn from 'hasown';
7
+import includes from 'array-includes';
8
import { elementType, getProp, getLiteralPropValue } from 'jsx-ast-utils';
9
10
import type { ESLintContext } from '../../flow/eslint';
@@ -20,7 +21,7 @@ const getElementType = (context: ESLintContext): ((node: JSXOpeningElement) => s
20
21
22
let rawType = elementType(node);
23
if (polymorphicProp) {
- if (!polymorphicAllowList || polymorphicAllowList.includes(rawType)) {
24
+ if (!polymorphicAllowList || includes(polymorphicAllowList, rawType)) {
25
rawType = polymorphicProp;
26
}
27
0 commit comments