Skip to content

Commit

Permalink
Add url case when Value is Data
Browse files Browse the repository at this point in the history
  • Loading branch information
0xLeif committed Mar 22, 2022
1 parent 58e4746 commit 760c971
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/o/URL/o+url.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ public extension o.url {
return
}

if let data = data as? Value {
successHandler(data, response)
return
}

do {
let value = try JSONDecoder().decode(Value.self, from: data)
successHandler(value, response)
Expand Down

0 comments on commit 760c971

Please sign in to comment.