Skip to content

Commit

Permalink
fix: add changes of pickDocument.ts for expo
Browse files Browse the repository at this point in the history
  • Loading branch information
khushal87 committed Aug 2, 2023
1 parent 1adbe1d commit 2feef41
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions package/expo-package/src/optionalDependencies/pickDocument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@ export const pickDocument = DocumentPicker
? async () => {
try {
const result = await DocumentPicker.getDocumentAsync();
const {
// New data from latest version of expo-document-picker
assets,
canceled,
// Old data from older version of expo-document-picker
type,
...rest
} = result;

// New data from latest version of expo-document-picker
const { assets, canceled } = result;

// Old data from older version of expo-document-picker
const { type, ...rest } = result;

// Applicable to latest version of expo-document-picker
if (canceled) {
Expand Down

0 comments on commit 2feef41

Please sign in to comment.