diff --git a/core/ui/src/main/java/io/github/droidkaigi/confsched2022/ui/IfModifier.kt b/core/ui/src/main/java/io/github/droidkaigi/confsched2022/ui/IfModifier.kt index e1c11c362..a49664e77 100644 --- a/core/ui/src/main/java/io/github/droidkaigi/confsched2022/ui/IfModifier.kt +++ b/core/ui/src/main/java/io/github/droidkaigi/confsched2022/ui/IfModifier.kt @@ -3,5 +3,6 @@ package io.github.droidkaigi.confsched2022.ui import androidx.compose.ui.Modifier inline fun Modifier.ifTrue(value: Boolean, builder: Modifier.() -> Modifier): Modifier { - return then(if (value) builder() else Modifier) + val modifier = Modifier + return then(if (value) modifier.builder() else modifier) }