summaryrefslogtreecommitdiff
path: root/src/components/SmartClipboardButton.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/SmartClipboardButton.tsx')
-rw-r--r--src/components/SmartClipboardButton.tsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/components/SmartClipboardButton.tsx b/src/components/SmartClipboardButton.tsx
index 7217e83..c90515a 100644
--- a/src/components/SmartClipboardButton.tsx
+++ b/src/components/SmartClipboardButton.tsx
@@ -20,11 +20,12 @@ export function SmartClipboardButton() {
}, [showSuccess]);
const getLaunchOptionText = async (): Promise<string> => {
- const result = await getLaunchOption();
- if (!result.launch_option) {
- throw new Error("Launch option is unavailable");
+ try {
+ const result = await getLaunchOption();
+ return result.launch_option || "~/lsfg %command%";
+ } catch (error) {
+ return "~/lsfg %command%";
}
- return result.launch_option;
};
const copyToClipboard = async () => {