From e1b6840c9beb82d8761aa0e9376b356d5f12fa79 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sun, 10 May 2020 00:40:58 +0200 Subject: Add simplified version of FormPanel DSL builder function to easily create HTML form elements with attributes. --- .../src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kvision-modules/kvision-bootstrap-upload/src/main/kotlin') diff --git a/kvision-modules/kvision-bootstrap-upload/src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt b/kvision-modules/kvision-bootstrap-upload/src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt index bdae5091..e1678e90 100644 --- a/kvision-modules/kvision-bootstrap-upload/src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt +++ b/kvision-modules/kvision-bootstrap-upload/src/main/kotlin/pl/treksoft/kvision/utils/Utils.kt @@ -61,7 +61,7 @@ suspend fun Form.getDataWithFileContent(): K { value.getValue() } }) - return this.modelFactory(map.withDefault { null }) + return this.modelFactory?.invoke(map.withDefault { null }) ?: throw IllegalStateException("Serializer not defined") } /** -- cgit