diff --git a/ui/create-election.html b/ui/create-election.html
index 94403c0..b856b67 100644
--- a/ui/create-election.html
+++ b/ui/create-election.html
@@ -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);
});
}