Skip setting data count if unavailable

This commit is contained in:
Davide De Rosa 2022-04-25 22:59:20 +02:00
parent 58cf401883
commit 92b9c4cd9a
1 changed files with 3 additions and 0 deletions

View File

@ -203,6 +203,9 @@ extension VPNManager {
private func onDataCount(_: Date) {
switch vpnState.value.vpnStatus {
case .connected:
guard let currentDataCount = currentDataCount else {
return
}
currentState?.dataCount = currentDataCount
default: