Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_setReference = (ref: ?Object) => {
if (ref) {
this._cameraRef = ref;
if (Platform.OS === 'web') {
this._cameraHandle = new LibCameraPhoto(this._cameraRef);
this.resumePreview();
} else {
this._cameraHandle = findNodeHandle(ref);
}
} else {
this._cameraRef = null;
this._cameraHandle = null;
}
};