Skip to content

Commit

Permalink
port fix for "Ambiguous use of 'map(JSONObject:)'"
Browse files Browse the repository at this point in the history
  • Loading branch information
brow authored Oct 20, 2021
1 parent 6da8aa5 commit 3448b26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AlamofireObjectMapper/AlamofireObjectMapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ extension DataRequest {
let JSONObject = processResponse(request: request, response: response, data: data, keyPath: keyPath)

if let JSONObject = JSONObject,
let parsedObject = (try? Mapper<T>(context: context, shouldIncludeNilValues: false).map(JSONObject: JSONObject)){
let parsedObject = (try? Mapper<T>(context: context, shouldIncludeNilValues: false).map(JSONObject: JSONObject) as T){
return .success(parsedObject)
}

Expand Down Expand Up @@ -164,7 +164,7 @@ extension DataRequest {

if let JSONObject = processResponse(request: request, response: response, data: data, keyPath: keyPath){

if let parsedObject = try? Mapper<T>(context: context, shouldIncludeNilValues: false).mapArray(JSONObject: JSONObject){
if let parsedObject = try? Mapper<T>(context: context, shouldIncludeNilValues: false).mapArray(JSONObject: JSONObject) as [T] {
return .success(parsedObject)
}
}
Expand Down

0 comments on commit 3448b26

Please sign in to comment.