yudielcurbelo/react-qr-scanner

useDeviceList() throws error when no cameras are available

MarcoWel opened this issue · 2 comments

On a computer without cameras, the line
const cameraDevices = useDeviceList();
causes an uncaught runtime error "Requested device not found".
IMO this should just create an empty array [].

Please try this beta 2.0.0-beta.8. There are breaking changes for this beta release.

This issue is fixed on new hook useDevices.