Skip to content

Commit

Permalink
fixed #59
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanbruel committed May 30, 2017
1 parent db626ba commit 0d1a036
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Moya-ObjectMapper.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Moya-ObjectMapper"
s.version = "2.3.1"
s.version = "2.3.2"
s.summary = "ObjectMapper bindings for Moya"
s.description = <<-EOS
[ObjectMapper](https://github.com/Hearst-DD/ObjectMapper) bindings for
Expand Down
4 changes: 2 additions & 2 deletions Source/Response+ObjectMapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ public extension Response {
/// protocol.
/// If the conversion fails, the signal errors.
public func mapArray<T: BaseMappable>(_ type: T.Type, context: MapContext? = nil) throws -> [T] {
guard let array = try mapJSON() as? [[String : Any]], let objects = Mapper<T>(context: context).mapArray(JSONArray: array) else {
guard let array = try mapJSON() as? [[String : Any]] else {
throw MoyaError.jsonMapping(self)
}
return objects
return Mapper<T>(context: context).mapArray(JSONArray: array)
}

}
Expand Down

0 comments on commit 0d1a036

Please sign in to comment.