From 73e672b25476b23c135fccfd0b7a67e1e8b915bd Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Mon, 26 Feb 2018 12:43:18 +0100 Subject: Fix incorrect cache of snabbdom event handlers. --- src/main/kotlin/pl/treksoft/kvision/core/Widget.kt | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/main/kotlin') 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 = 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 = 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() -- cgit