Skip to content

Commit 25dec48

Browse files
calvincestarigh-action-runner
authored andcommitted
fix: Use safer Dictionary initializer to prevent possible crashes (apollographql/apollo-ios-dev#884)
1 parent 5b3d616 commit 25dec48

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Sources/ApolloAPI/GraphQLNullable.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,9 @@ public protocol _InitializableByDictionaryLiteralElements: ExpressibleByDictiona
212212

213213
extension Dictionary: _InitializableByDictionaryLiteralElements {
214214
@inlinable public init(_ elements: [(Key, Value)]) {
215-
self.init(uniqueKeysWithValues: elements)
215+
self.init(elements) { current, new in
216+
return current
217+
}
216218
}
217219
}
218220

0 commit comments

Comments
 (0)