From 9e538396cf0f8b7f559b5d7ab6405ead423e313b Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Mon, 26 Feb 2018 12:47:34 +0100 Subject: Fix Div component initializer. --- src/main/kotlin/pl/treksoft/kvision/html/Div.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/main/kotlin/pl/treksoft') diff --git a/src/main/kotlin/pl/treksoft/kvision/html/Div.kt b/src/main/kotlin/pl/treksoft/kvision/html/Div.kt index f71799ac..38dc5817 100644 --- a/src/main/kotlin/pl/treksoft/kvision/html/Div.kt +++ b/src/main/kotlin/pl/treksoft/kvision/html/Div.kt @@ -35,9 +35,15 @@ open class Div( rich: Boolean = false, align: Align? = null, classes: Set = setOf(), - init: (Tag.() -> Unit)? = null + init: (Div.() -> Unit)? = null ) : - Tag(TAG.DIV, text, rich, align, classes, init) { + Tag(TAG.DIV, text, rich, align, classes) { + + init { + @Suppress("LeakingThis") + init?.invoke(this) + } + companion object { /** * DSL builder extension function. -- cgit