Handle string values for captureTarget prop (#543)

This change adds a conversion for string values of captureTarget property.
This commit is contained in:
Stefan Dobrev
2017-01-05 23:44:45 -08:00
committed by Zack Story
parent 4b089ced6b
commit f035e32b30
+4
View File
@@ -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') {