-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Allow
getCameraDevice
to return undefined
when no Devices ar…
…e available (e.g. iOS Simulator) (#1848) fix: Allow `getCameraDevice` to return `undefined` when no Devices are available
- Loading branch information
Showing
1 changed file
with
3 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 comment
on commit f7428f2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
react-native-vision-camera – ./
react-native-vision-camera-git-main-mrousavy-s-team.vercel.app
react-native-vision-camera.vercel.app
react-native-vision-camera.com
react-native-vision-camera-mrousavy-s-team.vercel.app
www.react-native-vision-camera.com
Wouldn't it better to have it like:
if (! bestDevice) return null;
Because at first glance
let bestDevice = filtered[0];
if there are no items in filtered array -> bestDevice will contain undefined value by default.