Skip to content

Commit dbe7e15

Browse files
khiga8ljharb
andcommitted
Update src/util/getElementType.js
Co-authored-by: Jordan Harband <[email protected]>
1 parent 6d3e666 commit dbe7e15

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)