Skip to content

Commit

Permalink
Fix crash on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
retyui committed Feb 2, 2021
1 parent 268c1c8 commit 0b5fb30
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ios/RNDocumentPicker/RNDocumentPicker.m
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ - (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocum
- (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentsAtURLs:(NSArray<NSURL *> *)urls
{
RCTPromiseResolveBlock resolve = [composeResolvers lastObject];

if (resolve == nil) {
return;
}

RCTPromiseRejectBlock reject = [composeRejecters lastObject];
[composeResolvers removeLastObject];
[composeRejecters removeLastObject];
Expand Down

0 comments on commit 0b5fb30

Please sign in to comment.