From 510126ec7193f98bcdac396c3e39941bfdaaf21b Mon Sep 17 00:00:00 2001 From: Richie McIlroy <33632126+richiemcilroy@users.noreply.github.com> Date: Wed, 31 Jul 2024 17:53:44 +0100 Subject: [PATCH] version: Release 0.2.9 - Scap recording engine integration --- apps/desktop/src/components/windows/Camera.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/desktop/src/components/windows/Camera.tsx b/apps/desktop/src/components/windows/Camera.tsx index aae5a91f..5fba6f6e 100644 --- a/apps/desktop/src/components/windows/Camera.tsx +++ b/apps/desktop/src/components/windows/Camera.tsx @@ -22,12 +22,16 @@ export const Camera = () => { ); const [overlaySize, setOverlaySize] = useState<"sm" | "lg">("sm"); const [overlayShape, setOverlayShape] = useState<"round" | "square">( - (localStorage.getItem("cameraOverlayShape") as "round" | "square") || - "round" + typeof localStorage !== "undefined" + ? (localStorage.getItem("cameraOverlayShape") as "round" | "square") || + "round" + : "round" ); useEffect( - () => localStorage.setItem("cameraOverlayShape", overlayShape), + () => + typeof localStorage !== "undefined" && + localStorage.setItem("cameraOverlayShape", overlayShape), [overlayShape] );