Skip to content

Commit c9485e5

Browse files
committed
fix(ios): prevent crash on request failure
1 parent e4ae96f commit c9485e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/request.ios.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ function AFFailure(resolve, reject, task: NSURLSessionDataTask, error: NSError,
230230
let getHeaders = () => ({});
231231
const sendi = ({
232232
task,
233-
contentLength: task.countOfBytesReceived,
233+
contentLength: task?.countOfBytesReceived,
234234
reason: error.localizedDescription,
235235
get headers() {
236236
return getHeaders();

0 commit comments

Comments
 (0)