diff --git a/Sources/Unbox.swift b/Sources/Unbox.swift index 076a4b1..92a173d 100644 --- a/Sources/Unbox.swift +++ b/Sources/Unbox.swift @@ -487,14 +487,12 @@ public class Unboxer { } let transformedStringArray = UnboxValueResolver<[String]>(self).resolveOptionalValueForKey(key, isKeyPath: isKeyPath, transform: { stringArray -> [T]? in - do { - return try stringArray.flatMap { - guard let transformedUnboxedString = T.transformUnboxedString($0) else { throw UnboxValueError.InvalidValue($0, key) } - return transformedUnboxedString - } - } catch { - return nil + var transformedStringArray = [T]() + for string in stringArray { + guard let transformedUnboxedString = T.transformUnboxedString(string) else { return nil } + transformedStringArray.append(transformedUnboxedString) } + return transformedStringArray }) if let transformedStringArray = transformedStringArray {