File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ public struct GraphQLError: Error, Codable {
118118 public init ( from decoder: Decoder ) throws {
119119 let container = try decoder. container ( keyedBy: CodingKeys . self)
120120 message = try container. decode ( String . self, forKey: . message)
121- locations = try container. decode ( [ SourceLocation] ? . self, forKey: . locations) ?? [ ]
121+ locations = ( try ? container. decode ( [ SourceLocation] ? . self, forKey: . locations) ) ?? [ ]
122122 path = try container. decode ( IndexPath . self, forKey: . path)
123123 }
124124
@@ -166,7 +166,7 @@ public struct IndexPath: Codable {
166166
167167 public init ( from decoder: Decoder ) throws {
168168 var container = try decoder. unkeyedContainer ( )
169- elements = try container. decode ( [ IndexPathValue ] . self)
169+ elements = ( try ? container. decode ( [ IndexPathValue ] . self) ) ?? [ ]
170170 }
171171
172172 public func encode( to encoder: Encoder ) throws {
You can’t perform that action at this time.
0 commit comments