Skip to content

Commit

Permalink
Avoid JSON cache by JSONSerialization NSString
Browse files Browse the repository at this point in the history
  • Loading branch information
bgoncal committed Apr 15, 2024
1 parent b99c77e commit d3e1fc2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Source/Data/HADataDecodable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ public extension HAData {
}

if let value = value as? T {
return value
if var valueString = value as? String {
valueString.makeContiguousUTF8()
return valueString as? T ?? value
} else {
return value
}
}

throw HADataError.incorrectType(
Expand Down

0 comments on commit d3e1fc2

Please sign in to comment.