Skip to content

Commit da63f37

Browse files
committed
ModuleAPI.kt comparing module name improved.
Signed-off-by: Pavel Erokhin (MairwunNx) <MairwunNx@gmail.com>
1 parent 2be1ef2 commit da63f37

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/main/kotlin/com/mairwunnx/projectessentials/core/api/v1/module

src/main/kotlin/com/mairwunnx/projectessentials/core/api/v1/module/ModuleAPI.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ object ModuleAPI {
3131
* @since 2.0.0-SNAPSHOT.1.
3232
*/
3333
fun getModuleByName(name: String) =
34-
getAllModules().find { it.name == name }?.let {
34+
getAllModules().find { it.name.toLowerCase() == name.toLowerCase() }?.let {
3535
return@let it
3636
} ?: throw ModuleNotFoundException(
3737
"Module with name $name not found and not processed."
@@ -43,6 +43,6 @@ object ModuleAPI {
4343
* @since 2.0.0-SNAPSHOT.1.
4444
*/
4545
fun isModuleExist(module: String) = ModuleProcessor.getModules().find {
46-
it.name == module
46+
it.name.toLowerCase() == module.toLowerCase()
4747
}.let { return@let it != null }
4848
}

0 commit comments

Comments
 (0)