Errors merging optimization

This commit is contained in:
pkurchatov
2023-12-17 00:53:40 +03:00
parent 0aeeec7a9a
commit 6ddb38b2a4
@@ -83,7 +83,9 @@ public func mergeErrors(
) -> [DeserializationError] {
var resultingErrors: [DeserializationError] = []
errors.forEach {
resultingErrors.append(contentsOf: $0?.asArray() ?? [])
if let item = $0 {
resultingErrors.append(contentsOf: item)
}
}
return resultingErrors
}