1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-25 07:57:12 -07:00

More syntax fix.

This commit is contained in:
Erik C. Thauvin 2017-11-01 10:13:39 -07:00
parent 05d0ff04fb
commit e8dcfc6d4b

View file

@ -138,8 +138,8 @@ class GithubApi2 @Inject constructor(
val releases = ex.body()
if (releases != null) {
releases.firstOrNull()?.let {
try {
result = listOf(it.name, it.tagName).filterNotNull().first { !it.isBlank() }
result = try {
listOf(it.name, it.tagName).filterNotNull().first { !it.isBlank() }
} catch(ex: NoSuchElementException) {
throw KobaltException("Couldn't find the latest release")
}