Skip to content

Commit

Permalink
update code comment
Browse files Browse the repository at this point in the history
  • Loading branch information
khiga8 committed May 16, 2024
1 parent 9600041 commit e6f3c9e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/utils/get-element-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit e6f3c9e

Please sign in to comment.