Pārlūkot izejas kodu

Fixed problem with type casting (#513)

Resulted in `errMsg = "task cancelled"` even though isCancelled was "0".
Gabor Wnuk 7 gadus atpakaļ
vecāks
revīzija
4205ebc3d1
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1
    1
      ios/RNFetchBlobNetwork.m

+ 1
- 1
ios/RNFetchBlobNetwork.m Parādīt failu

@@ -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
     }