Skip to content

Commit 510126e

Browse files
committed
version: Release 0.2.9 - Scap recording engine integration
1 parent 845aff8 commit 510126e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

apps/desktop/src/components/windows/Camera.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,16 @@ export const Camera = () => {
2222
);
2323
const [overlaySize, setOverlaySize] = useState<"sm" | "lg">("sm");
2424
const [overlayShape, setOverlayShape] = useState<"round" | "square">(
25-
(localStorage.getItem("cameraOverlayShape") as "round" | "square") ||
26-
"round"
25+
typeof localStorage !== "undefined"
26+
? (localStorage.getItem("cameraOverlayShape") as "round" | "square") ||
27+
"round"
28+
: "round"
2729
);
2830

2931
useEffect(
30-
() => localStorage.setItem("cameraOverlayShape", overlayShape),
32+
() =>
33+
typeof localStorage !== "undefined" &&
34+
localStorage.setItem("cameraOverlayShape", overlayShape),
3135
[overlayShape]
3236
);
3337

0 commit comments

Comments
 (0)