Skip to content

Commit

Permalink
VxDesign: Fix bug for primary elections (#4400)
Browse files Browse the repository at this point in the history
There was a well-intentioned assertion guarding against an edge case in
primary elections where there were no partisan contests (which would
result in no ballot styles being generated). The intention was to
explain to the user why there were no ballot styles in that case.
However, crashing the app until partisan contests are added prevents the
user from being able to address the issue, so it was not a good
solution.
  • Loading branch information
jonahkagan authored Dec 13, 2023
1 parent c126a3b commit f1e2f0d
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions apps/design/backend/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,6 @@ export function generateBallotStyles(
)
.map((contest) => contest.partyId)
);
assert(
partyIds.length > 0,
'Primary elections cannot have ballot styles with no partisan contests'
);
const parties = election.parties.filter((party) =>
partyIds.includes(party.id)
);
Expand Down

0 comments on commit f1e2f0d

Please sign in to comment.