mirror of
https://github.com/AsgardEternal/squad-js-map-vote.git
synced 2025-01-23 18:23:52 -06:00
fix: untested. vote being carried to next match
This commit is contained in:
parent
246d904a92
commit
c3767bce85
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user