diff options
author | Robert Jaros <rjaros@finn.pl> | 2018-02-26 12:47:34 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2018-02-26 12:47:34 +0100 |
commit | 9e538396cf0f8b7f559b5d7ab6405ead423e313b (patch) | |
tree | c36cf2e43cea5f897c750f25f522f59c0eacf2eb /src/main/kotlin | |
parent | 60bf54b6062199de460c7213f87f5cac8c9d97b3 (diff) | |
download | kvision-9e538396cf0f8b7f559b5d7ab6405ead423e313b.tar.gz kvision-9e538396cf0f8b7f559b5d7ab6405ead423e313b.tar.bz2 kvision-9e538396cf0f8b7f559b5d7ab6405ead423e313b.zip |
Fix Div component initializer.
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/html/Div.kt | 10 |
1 files changed, 8 insertions, 2 deletions
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<String> = 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. |