Skip to content

Commit

Permalink
fix(subscription): handle nullable receiver / notifier info
Browse files Browse the repository at this point in the history
  • Loading branch information
bobeal committed Nov 28, 2023
1 parent 61eb7ec commit 29f176d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fun toZonedDateTime(entry: Any?): ZonedDateTime =
fun toNullableZonedDateTime(entry: Any?): ZonedDateTime? =
(entry as? OffsetDateTime)?.atZoneSameInstant(ZoneOffset.UTC)
fun <T> toList(entry: Any?): List<T> = (entry as Array<T>).toList()
fun toJsonString(entry: Any?): String = (entry as Json).asString()
fun toJsonString(entry: Any?): String? = (entry as? Json)?.asString()
inline fun <reified T : Enum<T>> toEnum(entry: Any) = enumValueOf<T>(entry as String)
inline fun <reified T : Enum<T>> toOptionalEnum(entry: Any?) =
(entry as? String)?.let { enumValueOf<T>(it) }
Expand Down

0 comments on commit 29f176d

Please sign in to comment.