Skip to content

Commit

Permalink
React flavours: Fix an edge case where casing decides which react com…
Browse files Browse the repository at this point in the history
…ponent we use
  • Loading branch information
oyvindberg committed Dec 15, 2021
1 parent f4451cf commit 906a0ca
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class IdentifyReactComponents(
val preferNested = c.nested.length

/* because for instance mui ships with icons called `List` and `Tab` */
val preferPropsMatchesName = c.propsRef.ref.name.unescaped.startsWith(c.fullName.unescaped)
val preferPropsMatchesName = c.propsRef.ref.name.unescaped.toLowerCase.startsWith(c.fullName.unescaped.toLowerCase)

/* because for instance mui declares both a default and a names export, where only the former exists */
val preferDefault = c.scalaRef.name === Name.Default
Expand Down

0 comments on commit 906a0ca

Please sign in to comment.