]> git.cworth.org Git - lmno.games/blobdiff - empathy/empathy.jsx
Fix category voting to select among only those with the most votes
[lmno.games] / empathy / empathy.jsx
index b9579a6893e2a9b91ea28f8da34da2182e4c75b9..001dcd5eeeb5ac3f943d368f971f8a78d19981d3 100644 (file)
@@ -440,7 +440,7 @@ const LetsPlay = React.memo(props => {
   if (max_votes < quorum)
     return null;
 
   if (max_votes < quorum)
     return null;
 
-  const candidates = props.prompts.filter(p => p.votes.length >= quorum);
+  const candidates = props.prompts.filter(p => p.votes.length >= max_votes);
   const index = Math.floor(Math.random() * candidates.length);
   const winner = candidates[index];
 
   const index = Math.floor(Math.random() * candidates.length);
   const winner = candidates[index];