Skip to content

Commit ece8bc6

Browse files
author
Samy Ouyahia
committed
fix: Fixed the Sentry null error in the useCamera hook
1 parent 215ba74 commit ece8bc6

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)