From 2feef41497428ce4e6530f1b1990c173e312159c Mon Sep 17 00:00:00 2001 From: Khushal Agarwal Date: Wed, 2 Aug 2023 16:22:22 +0530 Subject: [PATCH] fix: add changes of pickDocument.ts for expo --- .../src/optionalDependencies/pickDocument.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/package/expo-package/src/optionalDependencies/pickDocument.ts b/package/expo-package/src/optionalDependencies/pickDocument.ts index 519213b3af..8a4d2cd921 100644 --- a/package/expo-package/src/optionalDependencies/pickDocument.ts +++ b/package/expo-package/src/optionalDependencies/pickDocument.ts @@ -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) {