fix: primaryChannel IndexOutOfBoundsException

master
andrekir 2023-04-14 07:26:18 -03:00
rodzic 97fe340587
commit 88d415f2ce
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -41,7 +41,7 @@ data class ChannelSet(
*/
val primaryChannel: Channel?
get() = with(protobuf) {
Channel(getSettings(0), loraConfig).takeIf { settingsCount > 0 }
if (settingsCount > 0) Channel(getSettings(0), loraConfig) else null
}
/// Return an URL that represents the current channel values