Skip to content

Commit e6f3c9e

Browse files
committed
update code comment
1 parent 9600041 commit e6f3c9e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/utils/get-element-type.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ function getElementType(context, node, lazyElementCheck = false) {
1717
// check if the node contains a polymorphic prop
1818
const polymorphicPropName = settings?.github?.polymorphicPropName ?? 'as'
1919

20-
let checkConditionalMap = true
21-
2220
const prop = getProp(node.attributes, polymorphicPropName)
2321
const literalPropValue = getLiteralPropValue(getProp(node.attributes, polymorphicPropName))
22+
let checkConditionalMap = true
23+
24+
// If the prop is not a literal and we cannot determine it, don't fall back to the conditional map value, if it exists
2425
if (prop && !literalPropValue) {
2526
checkConditionalMap = false
2627
}

0 commit comments

Comments
 (0)