Skip to content

Commit 3978030

Browse files
khiga8ljharb
andauthored
Update src/util/getElementType.js
Co-authored-by: Jordan Harband <[email protected]>
1 parent 3889dd1 commit 3978030

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/util/getElementType.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ const getElementType = (context: ESLintContext): ((node: JSXOpeningElement) => s
2020

2121
let rawType = elementType(node);
2222
if (polymorphicProp) {
23-
if (!polymorphicAllowList) {
24-
rawType = polymorphicProp;
25-
} else if (polymorphicAllowList.includes(rawType)) {
23+
if (!polymorphicAllowList || polymorphicAllowList.includes(rawType)) {
2624
rawType = polymorphicProp;
2725
}
2826
}

0 commit comments

Comments
 (0)