Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

possibly fix login crash

Brendan Allan6364647ddcdb
diff --git a/apps/desktop/src/routes/(window-chrome)/index.tsx b/apps/desktop/src/routes/(window-chrome)/index.tsx
index 646be8433..f4b9ca099 100644
--- a/apps/desktop/src/routes/(window-chrome)/index.tsx
+++ b/apps/desktop/src/routes/(window-chrome)/index.tsx
@@ -202,7 +202,7 @@ export default function () {
</button>
</div>
<KSelect<CaptureWindow | null>
- options={windows.data ?? []}
+ options={windows.status === "success" ? windows.data : []}
optionValue="id"
optionTextValue="name"
placeholder="Window"
@@ -377,7 +377,12 @@ export default function () {
<div class="flex flex-col gap-[0.25rem] items-stretch">
<label class="text-gray-400">Microphone</label>
<KSelect<{ name: string }>
- options={[{ name: "No Audio" }, ...(audioDevices.data ?? [])]}
+ options={[
+ { name: "No Audio" },
+ ...(audioDevices.status === "success"
+ ? audioDevices.data ?? []
+ : []),
+ ]}
optionValue="name"
optionTextValue="name"
placeholder="No Audio"
@@ -511,3 +516,8 @@ function createUpdateCheck() {
navigate("/update");
});
}
+
+function dbg<T>(v: T) {
+ console.log(v);
+ return v;
+}