From 8222ffc5989a1ebc3a9a5d7f22765df37785afed Mon Sep 17 00:00:00 2001 From: Gabor Wnuk Date: Fri, 8 Sep 2017 14:57:43 +0200 Subject: [PATCH] Fixed problem with type casting Resulted in `errMsg = "task cancelled"` even though isCancelled was "0". --- ios/RNFetchBlobNetwork.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/RNFetchBlobNetwork.m b/ios/RNFetchBlobNetwork.m index 16b60774e..34ebabb95 100644 --- a/ios/RNFetchBlobNetwork.m +++ b/ios/RNFetchBlobNetwork.m @@ -505,7 +505,7 @@ - (void) URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCom errMsg = [error localizedDescription]; } NSDictionary * taskSession = [taskTable objectForKey:taskId]; - BOOL isCancelled = [taskSession valueForKey:@"isCancelled"]; + BOOL isCancelled = [[taskSession valueForKey:@"isCancelled"] boolValue]; if(isCancelled) { errMsg = @"task cancelled"; }