Skip to content

Commit 0d1a036

Browse files
committed
fixed #59
1 parent db626ba commit 0d1a036

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Moya-ObjectMapper.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "Moya-ObjectMapper"
3-
s.version = "2.3.1"
3+
s.version = "2.3.2"
44
s.summary = "ObjectMapper bindings for Moya"
55
s.description = <<-EOS
66
[ObjectMapper](https://github.com/Hearst-DD/ObjectMapper) bindings for

Source/Response+ObjectMapper.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ public extension Response {
2424
/// protocol.
2525
/// If the conversion fails, the signal errors.
2626
public func mapArray<T: BaseMappable>(_ type: T.Type, context: MapContext? = nil) throws -> [T] {
27-
guard let array = try mapJSON() as? [[String : Any]], let objects = Mapper<T>(context: context).mapArray(JSONArray: array) else {
27+
guard let array = try mapJSON() as? [[String : Any]] else {
2828
throw MoyaError.jsonMapping(self)
2929
}
30-
return objects
30+
return Mapper<T>(context: context).mapArray(JSONArray: array)
3131
}
3232

3333
}

0 commit comments

Comments
 (0)