Skip to content

Commit

Permalink
fix(ios): prevent crash on request failure
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Nov 2, 2022
1 parent e4ae96f commit c9485e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/request.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ function AFFailure(resolve, reject, task: NSURLSessionDataTask, error: NSError,
let getHeaders = () => ({});
const sendi = ({
task,
contentLength: task.countOfBytesReceived,
contentLength: task?.countOfBytesReceived,
reason: error.localizedDescription,
get headers() {
return getHeaders();
Expand Down

0 comments on commit c9485e5

Please sign in to comment.