Fixed editing alarm tones.

This commit is contained in:
Aaron
2021-01-27 22:52:50 -05:00
parent 83d304e215
commit 15949b6405
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -160,7 +160,7 @@ class Alarms: Codable
}
/// Read alarms from local storage
func localRead() { list = JSON.parse([Alarm].self, localStorage.string(forKey: "alarms")!)! }
func localRead() { list = JSON.parse([Alarm].self, localStorage.string(forKey: "alarms")!) ?? []}
/// Read an alarm object from local storage
static func fromLocal() -> Alarms { return Alarms().apply { $0.localRead() } }