Revert jsonstring change

This commit is contained in:
Garth Vander Houwen 2025-07-28 11:25:15 -07:00
parent a2bf5633dd
commit ad439dbd0a

View file

@ -23,7 +23,7 @@ struct UserDefault<T: Decodable> {
let storedValue = UserDefaults.standard.object(forKey: key.rawValue)
guard let storedValue,
let jsonString = (storedValue is String) ? "\"\(storedValue)\"" : "\(storedValue)",
let jsonString = (storedValue as? String != nil) ? "\"\(storedValue)\"" : "\(storedValue)",
let data = jsonString.data(using: .utf8),
let value = (try? JSONDecoder().decode(T.self, from: data)) else { return defaultValue }