Skip to content

Commit

Permalink
fix: check only for not allowed or found media errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fhenrich33 committed Aug 2, 2024
1 parent 108b583 commit b758d1d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion front/src/components/QrReader/QrReaderContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ function QrReaderContainer({ onSuccess }: IQrReaderContainerProps) {
.catch((error) => {
if (error.name === "NotAllowedError") {
setIsCameraNotPermited(true);
} else {
}

if (error.name === "NotFoundError") {
triggerError({
userMessage: "No camera is available on your device.",
message: `getUserMedia error: ${error.name}`,
Expand Down

0 comments on commit b758d1d

Please sign in to comment.