Skip to content

Commit cb942e1

Browse files
AnthonyMDevgh-action-runner
authored andcommitted
Fix infinite loop bug in Test Mocks (apollographql/apollo-ios-dev#842)
1 parent 90964dd commit cb942e1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Sources/ApolloTestSupport/TestMock.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ fileprivate extension Array {
198198
case let innerArray as Array<Any>:
199199
return innerArray._unsafelyConvertToSelectionSetData() as JSONValue
200200

201+
case let element as JSONValue:
202+
return element
203+
201204
case let optionalElement as Optional<any Sendable>:
202205
guard case let .some(element) = optionalElement.asNullable else {
203206
return nil

0 commit comments

Comments
 (0)