Skip to content

Commit 3c42e6a

Browse files
bubskikevints
authored andcommitted
Fixed fallback case for decoding CGFloat
1 parent b644689 commit 3c42e6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Foundation/CGFloat.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -962,9 +962,9 @@ extension CGFloat : Codable {
962962
// other type.
963963
do {
964964
if NativeType.self == Float.self {
965-
self.native = NativeType(try container.decode(Float.self))
966-
} else {
967965
self.native = NativeType(try container.decode(Double.self))
966+
} else {
967+
self.native = NativeType(try container.decode(Float.self))
968968
}
969969
} catch {
970970
// Failed to decode as the other type, too. This is neither a Float nor

0 commit comments

Comments
 (0)