Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
yusufozgul committed Apr 3, 2024
1 parent 355fe9f commit cfc81d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/SwiftyJS/JSValueCoder/JSValueDecoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ private extension JSValueDecoder {
}

mutating func decode(_: Int64.Type) -> Int64 {
return Int64(decodeValue(forKey: key).toDouble())
return Int64(decode(Double.self))
}

mutating func decode(_: UInt.Type) -> UInt {
Expand All @@ -298,7 +298,7 @@ private extension JSValueDecoder {
}

mutating func decode(_: UInt64.Type) -> UInt64 {
return uint64(decodeValue(forKey: key).toDouble())
return UInt64(decode(Double.self))
}

mutating func decode<T>(_ type: T.Type) throws -> T where T: Decodable {
Expand Down Expand Up @@ -395,7 +395,7 @@ private extension JSValueDecoder {
}

func decode(_: Int64.Type) -> Int64 {
return Int64(decodeValue(forKey: key).toDouble())
return Int64(decode(Double.self))
}

func decode(_: UInt.Type) -> UInt {
Expand All @@ -411,7 +411,7 @@ private extension JSValueDecoder {
}

func decode(_: UInt64.Type) -> UInt64 {
return uint64(decodeValue(forKey: key).toDouble())
return UInt64(decode(Double.self))
}

func decode<T>(_ type: T.Type) throws -> T where T: Decodable {
Expand Down

0 comments on commit cfc81d2

Please sign in to comment.