diff --git a/src/components/Vote.vue b/src/components/Vote.vue index 383ee04..e3140b0 100644 --- a/src/components/Vote.vue +++ b/src/components/Vote.vue @@ -85,6 +85,7 @@ export default { methods: { start() { this.$store.commit("session/lockVote"); + clearInterval(this.voteTimer); this.voteTimer = setInterval(() => { this.$store.commit("session/lockVote"); if (this.session.lockedVote > this.players.length) { @@ -93,10 +94,11 @@ export default { }, 3000); }, stop() { - this.$store.commit("session/lockVote", 0); clearInterval(this.voteTimer); + this.$store.commit("session/lockVote", 0); }, finish() { + clearInterval(this.voteTimer); this.$store.commit("session/nomination", false); }, vote(vote) { diff --git a/src/store/socket.js b/src/store/socket.js index 21612e1..cc9ee9e 100644 --- a/src/store/socket.js +++ b/src/store/socket.js @@ -176,6 +176,7 @@ class LiveSession { * Update the gamestate based on incoming data. * @param gamestate * @param edition + * @param nomination * @private */ _updateGamestate({ gamestate, edition, nomination }) {