From 7364edb7b48230f4ac1041f904addd7f82b562bc Mon Sep 17 00:00:00 2001 From: Patel Divyesh Date: Thu, 26 Oct 2023 21:05:57 +0530 Subject: [PATCH] catch error in navigator api on http --- web/assets/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/assets/js/main.js b/web/assets/js/main.js index 60c7ca1..298fbff 100644 --- a/web/assets/js/main.js +++ b/web/assets/js/main.js @@ -146,7 +146,7 @@ celInput.addEventListener("mouseleave", () => { celCopyIcon.addEventListener("click", () => { let value = celEditor.editor.getValue(); - navigator.clipboard.writeText(value); + navigator.clipboard.writeText(value).catch(console.error); celCopyHover.style.display = "none" celCopyClick.style.display = "flex"; setTimeout(() => {