Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Do not fail when camera is undefined (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
wtrocki authored and paolobueno committed Nov 21, 2017
1 parent 51def2d commit ea2a6f9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/camera/src/buildCameraOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
export function buildCameraOptions(cordovaCamera): CameraOptions {
// try to access global camera object if none provided
cordovaCamera = cordovaCamera || navigator.camera;

if (!cordovaCamera) {
return {};
}
const options: CameraOptions = {
// Some common settings are 20, 50, and 100
'quality': 20,
Expand Down

0 comments on commit ea2a6f9

Please sign in to comment.