Add missing await

This commit is contained in:
2023-09-29 10:07:27 +01:00
parent e165ce232a
commit c4f40b5c8a

View File

@ -8,7 +8,7 @@ export const useCopy = (timeout = 2000) => {
setError(false); setError(false);
try { try {
if (navigator.clipboard && window.isSecureContext) { if (navigator.clipboard && window.isSecureContext) {
navigator.clipboard.writeText(text); await navigator.clipboard.writeText(text);
} else { } else {
const textArea = document.createElement("textarea"); const textArea = document.createElement("textarea");
textArea.value = text; textArea.value = text;