diff options
author | Robert Jaros <rjaros@finn.pl> | 2019-12-03 23:16:51 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2019-12-03 23:16:51 +0100 |
commit | e24f48420d1ee9a8684d8ccfa6d01d7e7036f5ee (patch) | |
tree | 0a938d55d46a2edefa70a683b2eabee396e90db5 | |
parent | ea03b4d8c69bb02bffb3222a0651be1334fa2a2a (diff) | |
download | kvision-e24f48420d1ee9a8684d8ccfa6d01d7e7036f5ee.tar.gz kvision-e24f48420d1ee9a8684d8ccfa6d01d7e7036f5ee.tar.bz2 kvision-e24f48420d1ee9a8684d8ccfa6d01d7e7036f5ee.zip |
Fix application testing (#113)
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/Application.kt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/Application.kt b/src/main/kotlin/pl/treksoft/kvision/Application.kt index 34d3e8cb..16354e9d 100644 --- a/src/main/kotlin/pl/treksoft/kvision/Application.kt +++ b/src/main/kotlin/pl/treksoft/kvision/Application.kt @@ -23,6 +23,7 @@ package pl.treksoft.kvision import pl.treksoft.kvision.panel.Root import kotlin.browser.document +import kotlin.browser.window /** * Base class for KVision applications. @@ -55,6 +56,8 @@ abstract class Application { * Main function for creating KVision applications. */ fun startApplication(builder: () -> Application) { + @Suppress("UnsafeCastFromDynamic") + if (window.asDynamic().__karma__) return fun start(state: dynamic): Application? { val application = builder() |