From c3767bce8512202abb4466a0fad301145f1d1b56 Mon Sep 17 00:00:00 2001 From: Davide Fantino <80767709+fantinodavide@users.noreply.github.com> Date: Thu, 23 Mar 2023 00:26:05 +0100 Subject: [PATCH] fix: untested. vote being carried to next match --- mapvote.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mapvote.js b/mapvote.js index d18be4c..8df3bdb 100644 --- a/mapvote.js +++ b/mapvote.js @@ -1025,9 +1025,10 @@ export default class MapVote extends DiscordBasePlugin { const ties = []; let highestScore = -Infinity; + const allScoreZero = this.tallies.find(s => s > 0) ? false : true; for (let choice in this.tallies) { const score = this.tallies[ choice ]; - if (score >= this.options.minimumVotesToAcceptResult) { + if (score >= this.options.minimumVotesToAcceptResult || allScoreZero) { if (score < highestScore) continue; else if (score > highestScore) {