Browse Source

Fixed problem with type casting (#513)

Resulted in `errMsg = "task cancelled"` even though isCancelled was "0".
Gabor Wnuk 7 years ago
parent
commit
4205ebc3d1
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      ios/RNFetchBlobNetwork.m

+ 1
- 1
ios/RNFetchBlobNetwork.m View File

@@ -505,7 +505,7 @@ NSOperationQueue *taskQueue;
505 505
         errMsg = [error localizedDescription];
506 506
     }
507 507
     NSDictionary * taskSession = [taskTable objectForKey:taskId];
508
-    BOOL isCancelled = [taskSession valueForKey:@"isCancelled"];
508
+    BOOL isCancelled = [[taskSession valueForKey:@"isCancelled"] boolValue];
509 509
     if(isCancelled) {
510 510
         errMsg = @"task cancelled";
511 511
     }