From de3d3aa4971e0fac49c20eae2ca5435866460d11 Mon Sep 17 00:00:00 2001 From: Davide Fantino <80767709+fantinodavide@users.noreply.github.com> Date: Sat, 25 Feb 2023 12:03:45 +0100 Subject: [PATCH] chore: timeout clearing endVoting --- mapvote.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mapvote.js b/mapvote.js index 484b5b2..70c8463 100644 --- a/mapvote.js +++ b/mapvote.js @@ -743,11 +743,9 @@ export default class MapVote extends DiscordBasePlugin { endVoting() { this.votingEnabled = false; - clearInterval(this.broadcastIntervalTask); - clearTimeout(this.newVoteTimeout); - clearTimeout(this.endVotingTimeout); - this.newVoteTimeout = null; - this.broadcastIntervalTask = null; + this.broadcastIntervalTask = clearInterval(this.broadcastIntervalTask); + this.newVoteTimeout = clearTimeout(this.newVoteTimeout); + this.endVotingTimeout = clearTimeout(this.endVotingTimeout); } objArrToValArr(arr, ...key) { let vet = [];