Browse Source

Adjust guard; WIP

Deniz Cengiz 1 year ago
parent
commit
94fac3f225
1 changed files with 1 additions and 1 deletions
  1. 1 1
      FreeAPS/Sources/Services/ContactTrick/ContactTrickManager.swift

+ 1 - 1
FreeAPS/Sources/Services/ContactTrick/ContactTrickManager.swift

@@ -230,7 +230,7 @@ final class BaseContactTrickManager: NSObject, ContactTrickManager, Injectable {
 
     private func sendState() {
         // TODO: why does this have to be JSON ?!
-        guard let data = try? JSONEncoder().encode(state) else {
+        guard ((try? JSONEncoder().encode(state)) != nil) else {
             warning(.service, "Cannot encode watch state")
             return
         }