From e67355a8a48fa8df9d1c6a91a5d854bb183e3759 Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Tue, 5 Nov 2019 19:04:59 +0100 Subject: Fix DRI.withClass --- core/src/main/kotlin/links/DRI.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/src') diff --git a/core/src/main/kotlin/links/DRI.kt b/core/src/main/kotlin/links/DRI.kt index fced7dde..67b8643b 100644 --- a/core/src/main/kotlin/links/DRI.kt +++ b/core/src/main/kotlin/links/DRI.kt @@ -67,7 +67,7 @@ data class DRI( } } -fun DRI.withClass(name: String) = copy(classNames = classNames.orEmpty() + ".$name") +fun DRI.withClass(name: String) = copy(classNames = if(classNames.isNullOrBlank()) name else "$classNames.$name") val DRI.parent: DRI get() = when { -- cgit