mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
More syntax fix.
This commit is contained in:
parent
05d0ff04fb
commit
e8dcfc6d4b
1 changed files with 2 additions and 2 deletions
|
@ -138,8 +138,8 @@ class GithubApi2 @Inject constructor(
|
||||||
val releases = ex.body()
|
val releases = ex.body()
|
||||||
if (releases != null) {
|
if (releases != null) {
|
||||||
releases.firstOrNull()?.let {
|
releases.firstOrNull()?.let {
|
||||||
try {
|
result = try {
|
||||||
result = listOf(it.name, it.tagName).filterNotNull().first { !it.isBlank() }
|
listOf(it.name, it.tagName).filterNotNull().first { !it.isBlank() }
|
||||||
} catch(ex: NoSuchElementException) {
|
} catch(ex: NoSuchElementException) {
|
||||||
throw KobaltException("Couldn't find the latest release")
|
throw KobaltException("Couldn't find the latest release")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue