diff --git a/Sources/JSONRPCKit/BatchElement.swift b/Sources/JSONRPCKit/BatchElement.swift index c8e3649..a74edd0 100644 --- a/Sources/JSONRPCKit/BatchElement.swift +++ b/Sources/JSONRPCKit/BatchElement.swift @@ -82,7 +82,7 @@ internal extension BatchElementProcotol { internal func result(from objects: [Any]) -> Result { let matchedObject = objects - .flatMap { $0 as? [String: Any] } + .compactMap { $0 as? [String: Any] } .filter { $0["id"].flatMap(Id.init) == id } .first