From 4205ebc3d1d22ab0039ec9ce3e7134b13500f3a0 Mon Sep 17 00:00:00 2001 From: Gabor Wnuk Date: Tue, 12 Sep 2017 03:40:45 +0200 Subject: [PATCH] Fixed problem with type casting (#513) 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"; }