mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-04 10:04:39 +02:00
Simplify nullable return
This commit is contained in:
parent
d4090d15be
commit
9e7a76bd97
1 changed files with 1 additions and 2 deletions
|
@ -87,8 +87,7 @@ object DeviceManager {
|
|||
* @return The ServerConnectionConfig instance or null if not found.
|
||||
*/
|
||||
fun getServerConnectionConfig(id: String?): ServerConnectionConfig? {
|
||||
if (id == null) return null
|
||||
return deviceData.serverConnectionConfigs.find { it.id == id }
|
||||
return id?.let { deviceData.serverConnectionConfigs.find { it.id == id } }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue