Quellcode durchsuchen

Fix IOS fs error handling when CameraRoll is not installed

Ben Hsieh vor 8 Jahren
Ursprung
Commit
0c407f0cde
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1
    1
      src/ios/RNFetchBlobFS.m

+ 1
- 1
src/ios/RNFetchBlobFS.m Datei anzeigen

371
             {
371
             {
372
                 BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath:path];
372
                 BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath:path];
373
                 if(!exists) {
373
                 if(!exists) {
374
-                    reject(@"RNFetchBlobFS readFile error", @"file not exists", nil);
374
+                    reject(@"RNFetchBlobFS readFile error", @"file not exists", [[NSError alloc]init]);
375
                     return;
375
                     return;
376
                 }
376
                 }
377
                 fileContent = [NSData dataWithContentsOfFile:path];
377
                 fileContent = [NSData dataWithContentsOfFile:path];