Skip to content

Commit

Permalink
Fix marking rules (#265)
Browse files Browse the repository at this point in the history
* Proper check of maxMarks

* Bump version
  • Loading branch information
av-alexander authored Nov 10, 2023
1 parent 58bd815 commit 9671d6a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions lib/validators/selectionPileValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,7 @@ class SelectionPileValidator {
return choices.length < this.contest.markingType.minMarks;
}
private tooManySelections(choices: OptionSelection[]) {
if (this.contest.markingType.votesAllowedPerOption) {
return (
choices.length > this.contest.markingType.maxMarks &&
choices.length > this.contest.markingType.votesAllowedPerOption
);
}
return choices.length > this.contest.markingType.maxMarks;
}
private exclusiveNotAlone(choices: OptionSelection[]) {
if (this.selectedReferences(choices).length < 2) return false;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aion-dk/js-client",
"version": "3.1.11",
"version": "3.1.12",
"license": "MIT",
"description": "Assembly Voting JS client",
"main": "dist/lib/av_client.js",
Expand Down

0 comments on commit 9671d6a

Please sign in to comment.