mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Revert jsonstring change
This commit is contained in:
parent
a2bf5633dd
commit
ad439dbd0a
1 changed files with 1 additions and 1 deletions
|
|
@ -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 }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue