Skip to content

Commit

Permalink
Merge pull request #1 from nextforce/fix-multi-tap-crash
Browse files Browse the repository at this point in the history
Fix multi-tap crash
  • Loading branch information
phatmann authored Jun 16, 2020
2 parents f44a9c3 + d9f7dab commit a0d4b73
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ios/RNDocumentPicker/RNDocumentPicker.m
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,16 @@ - (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocum
if (controller.documentPickerMode == UIDocumentPickerModeImport) {
RCTPromiseResolveBlock resolve = [composeResolvers lastObject];
RCTPromiseRejectBlock reject = [composeRejecters lastObject];

if (resolve == nil) {
return;
}

[composeResolvers removeLastObject];
[composeRejecters removeLastObject];

NSMutableArray *results = [NSMutableArray array];

for (id url in urls) {
NSError *error;
NSMutableDictionary* result = [self getMetadataForUrl:url error:&error];
Expand Down

0 comments on commit a0d4b73

Please sign in to comment.