Change copyAllCodes to async function
This commit is contained in:
@ -195,11 +195,10 @@
|
||||
});
|
||||
},
|
||||
|
||||
copyAllCodes() {
|
||||
async copyAllCodes() {
|
||||
const allCodes = this.voterIdentities.join("\n");
|
||||
navigator.clipboard.writeText(allCodes).then(() => {
|
||||
alert("All codes copied to clipboard!");
|
||||
}).catch(err => {
|
||||
await navigator.clipboard.writeText(allCodes)
|
||||
.catch(err => {
|
||||
console.error("Failed to copy all codes: ", err);
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user