Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ComposeMenu.js: Handle null for fileName in response from ImagePicker.
Fixes #3813. On iOS, it appears that the fileName is not included in the response given by ImagePicker.launchCamera if the user has not granted read access to their photo library. The case where fileName is undefined was handled correctly, but it turns out it's coming through as null, which was not handled. Neither the types nor the docs from react-native-image-picker are clear on this point, so that was filed as react-native-image-picker/react-native-image-picker#1271. I did not create a local copy of react-native-image-picker with the correct type, since it's very likely that we'll need to upgrade to later versions frequently as we're on an early version of this library which is known to have limitations and bugs. I added tests for fileName being undefined and being null.
- Loading branch information