diff --git a/package/expo-package/src/optionalDependencies/pickImage.ts b/package/expo-package/src/optionalDependencies/pickImage.ts index 9d2ce11533..fa6b98d034 100644 --- a/package/expo-package/src/optionalDependencies/pickImage.ts +++ b/package/expo-package/src/optionalDependencies/pickImage.ts @@ -53,8 +53,10 @@ export const pickImage = ImagePicker return { cancelled: true }; } } + return { cancelled: true }; } catch (error) { console.log('Error while picking image', error); + return { cancelled: true }; } } : null; diff --git a/package/native-package/src/optionalDependencies/pickImage.ts b/package/native-package/src/optionalDependencies/pickImage.ts index 574c1538e9..5ab35fcd76 100644 --- a/package/native-package/src/optionalDependencies/pickImage.ts +++ b/package/native-package/src/optionalDependencies/pickImage.ts @@ -35,6 +35,7 @@ export const pickImage = ImagePicker } } catch (error) { console.log('Error picking image: ', error); + return { cancelled: true }; } } : null;