Skip to content

Commit

Permalink
allow blank (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
av-mads authored May 8, 2024
1 parent d7203b0 commit f8d7cf7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/validators/selectionPileValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class SelectionPileValidator {

errors.push(...this.exceededListVotes(selectionPile.optionSelections))

if (selectionPile.explicitBlank || this.implicitlyBlank(selectionPile.optionSelections)) return errors

if (includeLazyErrors) {
errors.push(...this.belowMinListVotes(selectionPile.optionSelections))
}
Expand Down Expand Up @@ -65,7 +67,7 @@ class SelectionPileValidator {
}

private belowMinListVotes(choices: OptionSelection[]) {
const options = this.recursiveFlattener(this.contest.options as OptionContent[]);
const options = this.recursiveFlattener(this.contest.options as OptionContent[]);

const optionsWithListLimit = options.map((op) => op?.minChooseableSuboptions ? op : null)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4.1.0",
"version": "4.1.1",
"name": "@aion-dk/js-client",
"license": "MIT",
"description": "Assembly Voting JS client",
Expand Down

0 comments on commit f8d7cf7

Please sign in to comment.