react-native-image-picker: fileName in Response is null, not undefined, contradicting Flow type
I’m using 0.26.10, but the type for ImagePickerResponse.fileName in the current version has not changed:
export interface ImagePickerResponse {
// [other things...]
fileName?: string;
}
At least in the old version I’m using, fileName is sometimes null, which goes against filename?: string; because it is neither absent, undefined, nor a string.
If I upgrade to the most recent version, will this be fixed by fileName being undefined instead of null? (If so, feel free to close this right away.) Or is this type still incorrect?
The snippet above is TypeScript, but I believe that index.js.flow in the npm package is generated from that file.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 17 (3 by maintainers)
Commits related to this issue
- 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... — committed to chrisbobbe/zulip-mobile by deleted user 4 years ago
- 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... — committed to chrisbobbe/zulip-mobile by deleted user 4 years ago
- 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 use... — committed to chrisbobbe/zulip-mobile by deleted user 4 years ago
- 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 use... — committed to zulip/zulip-mobile by deleted user 4 years ago
One other way that seems to work for me
I have that problem too but ios fileName: null
Workaround: