Skip to content

Commit

Permalink
fix: show clipboard error message
Browse files Browse the repository at this point in the history
  • Loading branch information
RichAyotte committed Sep 29, 2024
1 parent 164db7e commit 1e39e55
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions components/section-home/home-description.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,12 @@ async function copyToClipboard(text: string): Promise<void> {
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,
})
}
}
}
</script>
Expand Down

0 comments on commit 1e39e55

Please sign in to comment.