Skip to content

Commit

Permalink
filter empty lines (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
Danil0v3s authored Jan 6, 2025
1 parent 31dfb1f commit 4cc3748
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ object AutoUpdater {
private suspend fun HttpClient.getPropertiesMap(): Map<String, String> {
val response = get(propertiesUrl)
val body = response.bodyAsText()
return body.split("\n").map { line -> line.split("=").let { it[0] to it[1] } }.toMap()
return body.split("\n").filter { it.isNotBlank() }.associate { line -> line.split("=").let { it[0] to it[1] } }
}
}

Expand Down

0 comments on commit 4cc3748

Please sign in to comment.