Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix: prevent duplicate error dialog when sharing offline

shashank-sna47beb891e47
diff --git a/apps/desktop/src/routes/editor/ShareButton.tsx b/apps/desktop/src/routes/editor/ShareButton.tsx
index 9a29c64c7..a53fc08a6 100644
--- a/apps/desktop/src/routes/editor/ShareButton.tsx
+++ b/apps/desktop/src/routes/editor/ShareButton.tsx
@@ -33,7 +33,7 @@ function ShareButton() {
await commands.globalMessageDialog(
"You appear to be offline. Please check your internet connection and try again.",
);
- throw new Error("No internet connection");
+ return;
}
console.log("Starting upload process...");
diff --git a/apps/desktop/src/routes/recordings-overlay.tsx b/apps/desktop/src/routes/recordings-overlay.tsx
index a52e6f931..a9848daea 100644
--- a/apps/desktop/src/routes/recordings-overlay.tsx
+++ b/apps/desktop/src/routes/recordings-overlay.tsx
@@ -724,7 +724,7 @@ function createRecordingMutations(
await commands.globalMessageDialog(
"You appear to be offline. Please check your internet connection and try again.",
);
- throw new Error("No internet connection");
+ return;
}
// Check authentication first