Skip to content

Commit

Permalink
Do not allow attempts to add empty votes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinematics committed Nov 30, 2015
1 parent 3723390 commit 6e37673
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions TallyCore/Votes/VoteCounter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ public void AddVote(IEnumerable<string> voteParts, string voter, string postID,
if (string.IsNullOrEmpty(postID))
throw new ArgumentNullException(nameof(postID));

if (voteParts.Count() == 0)
return;

var votes = GetVotesCollection(voteType);
var voters = GetVotersCollection(voteType);

Expand Down

0 comments on commit 6e37673

Please sign in to comment.