Skip to content

Commit 664c527

Browse files
authored
Avoid warning when Proxy settings are null (#507)
1 parent 0fba7a1 commit 664c527

File tree

1 file changed

+4
-1
lines changed
  • composeApp/src/commonMain/kotlin/org/ooni/probe/data/models

1 file changed

+4
-1
lines changed

composeApp/src/commonMain/kotlin/org/ooni/probe/data/models/ProxyModel.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ sealed interface ProxySettings {
115115
port: Int?,
116116
): ProxySettings =
117117
when (protocol) {
118-
ProxyProtocol.NONE.value -> None
118+
ProxyProtocol.NONE.value,
119+
null,
120+
-> None
121+
119122
ProxyProtocol.PSIPHON.value -> Psiphon
120123

121124
ProxyProtocol.SOCKS5.value,

0 commit comments

Comments
 (0)