diff --git a/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt b/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt index 076fb1d..ba0eab1 100644 --- a/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt +++ b/common/src/main/kotlin/fr/username404/snowygui/config/Configuration.kt @@ -38,8 +38,7 @@ object Configuration { ) } } - @JvmField - val obtained: Config = run { + val obtained: Config by lazy { var result: Config = empty() with(file) { if (!exists()) { @@ -64,7 +63,7 @@ object Configuration { ).extract("Snowy") }.also { runBlocking { - writeConfig(it) + writeConfig(it.value) } } val enabledFeatures = mutableMapOf().apply {