aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2018-02-26 12:43:18 +0100
committerRobert Jaros <rjaros@finn.pl>2018-02-26 12:43:18 +0100
commit73e672b25476b23c135fccfd0b7a67e1e8b915bd (patch)
treed97bc433a75e6227b9ccfeef23abeb112dbe2610
parent92d29d717d6048016efe0fb7d92f1ff7e827d905 (diff)
downloadkvision-73e672b25476b23c135fccfd0b7a67e1e8b915bd.tar.gz
kvision-73e672b25476b23c135fccfd0b7a67e1e8b915bd.tar.bz2
kvision-73e672b25476b23c135fccfd0b7a67e1e8b915bd.zip
Fix incorrect cache of snabbdom event handlers.
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/core/Widget.kt11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt b/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt
index c9c97187..ac3ba143 100644
--- a/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt
@@ -38,7 +38,6 @@ import pl.treksoft.kvision.utils.snAttrs
import pl.treksoft.kvision.utils.snClasses
import pl.treksoft.kvision.utils.snOpt
import pl.treksoft.kvision.utils.snStyle
-import kotlin.Unit
/**
* Base widget class. The parent of all component classes.
@@ -156,7 +155,7 @@ open class Widget(classes: Set<String> = setOf()) : StyledComponent() {
attrs = snAttrs(getSnAttrsInternal())
style = snStyle(getSnStyleInternal())
`class` = snClasses(getSnClassInternal())
- on = getSnOnInternal()
+ on = getSnOn()
hook = getSnHooksInternal()
}
}
@@ -177,14 +176,6 @@ open class Widget(classes: Set<String> = setOf()) : StyledComponent() {
}()
}
- private fun getSnOnInternal(): com.github.snabbdom.On? {
- return snOnCache ?: {
- val s = getSnOn()
- snOnCache = s
- s
- }()
- }
-
private fun getSnHooksInternal(): com.github.snabbdom.Hooks? {
return snHooksCache ?: {
val s = getSnHooks()