diff options
Diffstat (limited to 'kvision-modules/kvision-remote/src')
-rw-r--r-- | kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/Socket.kt | 3 | ||||
-rw-r--r-- | kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/types/Date.kt | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/Socket.kt b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/Socket.kt index 74edaba0..f668d57a 100644 --- a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/Socket.kt +++ b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/Socket.kt @@ -92,8 +92,7 @@ class Socket { */ @Suppress("ThrowsCount", "MagicNumber") suspend fun receive(): String { - val event = eventQueue.receive() - return when (event) { + return when (val event = eventQueue.receive()) { is MessageEvent -> { event.data as String } diff --git a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/types/Date.kt b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/types/Date.kt index 6dc85060..55025512 100644 --- a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/types/Date.kt +++ b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/types/Date.kt @@ -28,7 +28,7 @@ import kotlinx.serialization.SerialDescriptor import kotlinx.serialization.internal.SerialClassDescImpl import kotlin.js.Date -actual typealias Date = kotlin.js.Date +actual typealias Date = Date /** * JSON date serializer. |