aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/pl/treksoft')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/utils/Snabbdom.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/utils/Snabbdom.kt b/src/main/kotlin/pl/treksoft/kvision/utils/Snabbdom.kt
index db40c072..583dd74c 100644
--- a/src/main/kotlin/pl/treksoft/kvision/utils/Snabbdom.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/utils/Snabbdom.kt
@@ -53,7 +53,7 @@ inline fun obj(init: dynamic.() -> Unit): dynamic {
@Suppress("UNUSED_VARIABLE")
inline fun <reified T> Any?.createInstance(vararg args: dynamic): T {
val jsClass = this
- val argsArray = (listOf<dynamic>() + args).toTypedArray()
+ val argsArray = (listOf<dynamic>(null) + args).toTypedArray()
return js("new (Function.prototype.bind.apply(jsClass, argsArray))").unsafeCast<T>()
}