diff --git a/lib/utils/get-element-type.js b/lib/utils/get-element-type.js index 41488a15..74e6fe39 100644 --- a/lib/utils/get-element-type.js +++ b/lib/utils/get-element-type.js @@ -17,10 +17,11 @@ function getElementType(context, node, lazyElementCheck = false) { // check if the node contains a polymorphic prop const polymorphicPropName = settings?.github?.polymorphicPropName ?? 'as' - let checkConditionalMap = true - const prop = getProp(node.attributes, polymorphicPropName) const literalPropValue = getLiteralPropValue(getProp(node.attributes, polymorphicPropName)) + let checkConditionalMap = true + + // If the prop is not a literal and we cannot determine it, don't fall back to the conditional map value, if it exists if (prop && !literalPropValue) { checkConditionalMap = false }