Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Commit 7bc952c

Browse files
committed
Fix incremental response
1 parent a7d6d77 commit 7bc952c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/ios/RNFetchBlobFS.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,9 +412,9 @@ + (void) readFile:(NSString *)path encoding:(NSString *)encoding
412412
}
413413
else
414414
{
415-
BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath:path];
416-
if(!exists) {
417-
reject(@"RNFetchBlobFS readFile error", @"file not exists", [[NSError alloc]init]);
415+
if(![[NSFileManager defaultManager] fileExistsAtPath:path]) {
416+
417+
reject(@"RNFetchBlobFS readFile error", @"file not exists", nil);
418418
return;
419419
}
420420
fileContent = [NSData dataWithContentsOfFile:path];

src/ios/RNFetchBlobProgress.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ -(id)initWithType:(ProgressType)type interval:(NSNumber *)interval count:(NSNumb
3232

3333
-(BOOL)shouldReport:(NSNumber *)nextProgress
3434
{
35-
BOOL result = YES;
35+
BOOL * result = YES;
3636
float countF = [self.count floatValue];
3737
if(countF > 0 && [nextProgress floatValue] > 0)
3838
{
@@ -43,7 +43,7 @@ -(BOOL)shouldReport:(NSNumber *)nextProgress
4343
// NSTimeInterval is defined as double
4444
NSNumber *timeStampObj = [NSNumber numberWithDouble: timeStamp];
4545
float delta = [timeStampObj doubleValue] - lastTick;
46-
BOOL shouldReport = delta > [self.interval doubleValue] && self.enable && result;
46+
BOOL * shouldReport = delta > [self.interval doubleValue] && self.enable && result;
4747
if(shouldReport)
4848
{
4949
tick++;

0 commit comments

Comments
 (0)