Skip to content

Commit

Permalink
fix: code sugestions to add ux experience when copying to clipboard f…
Browse files Browse the repository at this point in the history
…ails
  • Loading branch information
Adebesin-Cell committed Dec 28, 2024
1 parent 751273f commit 1f182cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/content/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ window.addEventListener('message', async (event) => {
// ACTION: copy-to-clipboard =============================
if (action === 'copy-to-clipboard') {
const { content } = _payload as { content: string }
navigator.clipboard.writeText(content)
navigator.clipboard.writeText(content).catch((err) => {
console.error('Clipboard write failed', err)
})
}

// ACTION: get-screenshot-image ===========================
Expand Down

0 comments on commit 1f182cc

Please sign in to comment.