diff --git a/plugin/src/main/kotlin/io/wttech/gradle/config/gui/Gui.kt b/plugin/src/main/kotlin/io/wttech/gradle/config/gui/Gui.kt index f7feebb..3be87a0 100644 --- a/plugin/src/main/kotlin/io/wttech/gradle/config/gui/Gui.kt +++ b/plugin/src/main/kotlin/io/wttech/gradle/config/gui/Gui.kt @@ -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()) } } }