Skip to content

Commit

Permalink
Merge pull request #62 from jbttn/jbutton/fix-bool-decoding
Browse files Browse the repository at this point in the history
Fix boolean decoding for Map objects
  • Loading branch information
paulofaria authored Jul 21, 2020
2 parents f3e93ab + 026ff6e commit eb234d1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/GraphQL/Map/Map.swift
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,10 @@ extension Map : Codable {
if container.decodeNil() {
self = .null
}

else if let bool = try? container.decode(Bool.self) {
self = .bool(bool)
}

else if let double = try? container.decode(Double.self) {
self = .number(Number(double))
Expand Down

0 comments on commit eb234d1

Please sign in to comment.