mirror of
https://github.com/status-im/react-native-camera.git
synced 2026-08-27 19:51:07 +00:00
Handle string values for captureTarget prop (#543)
This change adds a conversion for string values of captureTarget property.
This commit is contained in:
committed by
Zack Story
parent
4b089ced6b
commit
f035e32b30
@@ -41,6 +41,10 @@ function convertNativeProps(props) {
|
||||
if (typeof props.captureMode === 'string') {
|
||||
newProps.captureMode = Camera.constants.CaptureMode[props.captureMode];
|
||||
}
|
||||
|
||||
if (typeof props.captureTarget === 'string') {
|
||||
newProps.captureTarget = Camera.constants.CaptureTarget[props.captureTarget];
|
||||
}
|
||||
|
||||
// do not register barCodeTypes if no barcode listener
|
||||
if (typeof props.onBarCodeRead !== 'function') {
|
||||
|
||||
Reference in New Issue
Block a user