aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2018-02-26 12:47:34 +0100
committerRobert Jaros <rjaros@finn.pl>2018-02-26 12:47:34 +0100
commit9e538396cf0f8b7f559b5d7ab6405ead423e313b (patch)
treec36cf2e43cea5f897c750f25f522f59c0eacf2eb /src/main
parent60bf54b6062199de460c7213f87f5cac8c9d97b3 (diff)
downloadkvision-9e538396cf0f8b7f559b5d7ab6405ead423e313b.tar.gz
kvision-9e538396cf0f8b7f559b5d7ab6405ead423e313b.tar.bz2
kvision-9e538396cf0f8b7f559b5d7ab6405ead423e313b.zip
Fix Div component initializer.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/html/Div.kt10
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.