From 906a0cadd08f8345069e83f7820a421589ab1b2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Raddum=20Berg?= Date: Thu, 16 Dec 2021 00:03:17 +0100 Subject: [PATCH] React flavours: Fix an edge case where casing decides which react component we use --- .../internal/scalajs/flavours/IdentifyReactComponents.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scalajs/src/main/scala/org/scalablytyped/converter/internal/scalajs/flavours/IdentifyReactComponents.scala b/scalajs/src/main/scala/org/scalablytyped/converter/internal/scalajs/flavours/IdentifyReactComponents.scala index a92a7a3702..8fdfb7a830 100644 --- a/scalajs/src/main/scala/org/scalablytyped/converter/internal/scalajs/flavours/IdentifyReactComponents.scala +++ b/scalajs/src/main/scala/org/scalablytyped/converter/internal/scalajs/flavours/IdentifyReactComponents.scala @@ -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