Skip to content

Commit

Permalink
Detekt fix
Browse files Browse the repository at this point in the history
  • Loading branch information
krystian-panek-vmltech committed Nov 3, 2022
1 parent 60d884d commit d5814f4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions plugin/src/main/kotlin/io/wttech/gradle/config/gui/Gui.kt
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,8 @@ class Gui(val definition: Definition) {

private fun updateMalformedData() {
definition.props.forEach { prop ->
if (prop is StringProp) {
if (prop.options.get().isNotEmpty()) {
if (prop.value() !in prop.options.get()) {
prop.valueSet(prop.options.get().first())
}
}
if (prop is StringProp && prop.options.get().isNotEmpty() && prop.value() !in prop.options.get()) {
prop.valueSet(prop.options.get().first())
}
}
}
Expand Down

0 comments on commit d5814f4

Please sign in to comment.