We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9cb0f14 + c5de6f8 commit 33d55c0Copy full SHA for 33d55c0
ios/RNFetchBlob/RNFetchBlob.m
@@ -587,9 +587,12 @@ - (NSDictionary *)constantsToExport
587
588
if(scheme == nil || [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:scheme]]) {
589
dispatch_sync(dispatch_get_main_queue(), ^{
590
- [documentController presentPreviewAnimated:YES];
+ if([documentController presentPreviewAnimated:YES]) {
591
+ resolve(@[[NSNull null]]);
592
+ } else {
593
+ reject(@"EINVAL", @"document is not supported", nil);
594
+ }
595
});
- resolve(@[[NSNull null]]);
596
} else {
597
reject(@"EINVAL", @"scheme is not supported", nil);
598
}
0 commit comments