Skip to content

Commit

Permalink
Merge pull request #133 from Judah-Inpress/main
Browse files Browse the repository at this point in the history
fix: wrap in a react fragment
  • Loading branch information
jamenamcinteer authored Jan 8, 2025
2 parents 226dfe3 + 8bcdf27 commit 2edc4a3
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions src/BarcodeScannerComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,21 @@ export const BarcodeScannerComponent = ({
}, []);

return (
<Webcam
width={width}
height={height}
ref={webcamRef}
screenshotFormat="image/jpeg"
videoConstraints={
videoConstraints || {
facingMode,
<>
<Webcam
width={width}
height={height}
ref={webcamRef}
screenshotFormat="image/jpeg"
videoConstraints={
videoConstraints || {
facingMode,
}
}
}
audio={false}
onUserMediaError={onError}
/>
audio={false}
onUserMediaError={onError}
/>
</>
);
};

Expand Down

0 comments on commit 2edc4a3

Please sign in to comment.