Fix lint
This commit is contained in:
@@ -277,7 +277,8 @@ export const urlB64ToUint8Array = (base64String) => {
|
||||
export const copyToClipboard = (text) => {
|
||||
if (navigator.clipboard && window.isSecureContext) {
|
||||
return navigator.clipboard.writeText(text);
|
||||
} else {
|
||||
}
|
||||
// Fallback to the older method if clipboard API is not supported (or on HTTP)
|
||||
const textarea = document.createElement("textarea");
|
||||
textarea.value = text;
|
||||
textarea.setAttribute("readonly", ""); // Avoid mobile keyboards from popping up
|
||||
@@ -289,5 +290,4 @@ export const copyToClipboard = (text) => {
|
||||
document.execCommand("copy");
|
||||
document.body.removeChild(textarea);
|
||||
return Promise.resolve();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user