Skip to content

Commit

Permalink
fix(foundation): Fixed crash in URLSession.data(for:) (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjechris authored Oct 17, 2022
1 parent 4302be8 commit 25a81bc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ extension URLSession {
try await withCheckedThrowingContinuation { promise in
self.dataTask(with: urlRequest) { data, response, error in
if let error = error {
promise.resume(throwing: error)
return promise.resume(throwing: error)
}

guard let data = data, let response = response else {
Expand Down

0 comments on commit 25a81bc

Please sign in to comment.