fix race condition causing audible countdown

This commit is contained in:
Steffen 2021-01-07 21:42:28 +01:00
parent 84f73ceb01
commit e3b195d3e2
1 changed files with 2 additions and 2 deletions

View File

@ -180,15 +180,15 @@ export default {
},
methods: {
countdown() {
this.$store.commit("session/setVoteInProgress", true);
this.$store.commit("session/lockVote", 0);
this.$store.commit("session/setVoteInProgress", true);
this.voteTimer = setInterval(() => {
this.start();
}, 4000);
},
start() {
this.$store.commit("session/setVoteInProgress", true);
this.$store.commit("session/lockVote", 1);
this.$store.commit("session/setVoteInProgress", true);
clearInterval(this.voteTimer);
this.voteTimer = setInterval(() => {
this.$store.commit("session/lockVote");