ApsMode enum - refactor of fromString
This commit is contained in:
parent
6205c9b893
commit
e8a5dc2627
1 changed files with 1 additions and 1 deletions
|
@ -8,6 +8,6 @@ enum class ApsMode() {
|
|||
|
||||
companion object {
|
||||
|
||||
fun fromString(stringValue: String?) = values().firstOrNull { it.name == (stringValue?.uppercase() ?: UNDEFINED) }
|
||||
fun fromString(stringValue: String?) = values().firstOrNull { it.name == (stringValue?.uppercase() ?: UNDEFINED.name) } ?: UNDEFINED
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue