Change copyAllCodes to async function

This commit is contained in:
2025-01-16 16:36:25 +01:00
parent 70a0cd7d3b
commit afac0f8f91

View File

@ -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);
});
}