Skip to content

Commit dc09703

Browse files
authored
Merge pull request #332 from monkvision/fix/sentry-null-use-camera
Fixed the Sentry null error in the useCamera hook
2 parents 215ba74 + ece8bc6 commit dc09703

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/camera/src/components/Camera/hooks/useCamera.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default function useCamera(
6363
const arrayBuffer = canvas.getContext('2d').getImageData(0, 0, width, height).data;
6464

6565
let compressionTracing;
66-
if (Span) { compressionTracing = new Span('image-compression', 'func'); }
66+
if (Sentry && Span) { compressionTracing = new Span('image-compression', 'func'); }
6767

6868
if (onWarningMessage) { onWarningMessage('Compressing an image...'); }
6969
const compressed = await compress(arrayBuffer, width, height);

0 commit comments

Comments
 (0)