From 1e39e55ead03b6fe99bee90f0102717acf36bf24 Mon Sep 17 00:00:00 2001 From: Richard Ayotte Date: Sun, 29 Sep 2024 15:24:25 -0400 Subject: [PATCH] fix: show clipboard error message --- components/section-home/home-description.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/section-home/home-description.vue b/components/section-home/home-description.vue index c0ce3ac..e00516b 100644 --- a/components/section-home/home-description.vue +++ b/components/section-home/home-description.vue @@ -74,8 +74,12 @@ async function copyToClipboard(text: string): Promise { title: text, }) } catch (error) { - // Some browsers don't allow writing to the clipboard. - // Fail silently since we already know why. + if (error instanceof Error) { + notify({ + text: error.message, + title: error.name, + }) + } } }