diff --git a/Camera.js b/Camera.js index bb37ee6..6ee4c6c 100644 --- a/Camera.js +++ b/Camera.js @@ -111,8 +111,10 @@ export default class Camera extends Component { } async componentWillMount() { - const isAuthorized = await CameraManager.checkDeviceAuthorizationStatus(); - this.setState({ isAuthorized }); + if (Camera.checkDeviceAuthorizationStatus) { + const isAuthorized = await Camera.checkDeviceAuthorizationStatus(); + this.setState({ isAuthorized }); + } this.cameraBarCodeReadListener = NativeAppEventEmitter.addListener('CameraBarCodeRead', this.props.onBarCodeRead); }