Skip to content

Commit

Permalink
fix: ensure project 0 can be used
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlc03 committed Aug 30, 2024
1 parent 1e0a581 commit 014d764
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export const SubmitBallotButton = (): JSX.Element => {
const handleSubmitBallot = useCallback(async () => {
const votes = ballot.votes.map(({ amount, projectId }) => {
const index = projectIndices[projectId];
if (!index) {

if (index === -1 || index === undefined) {
throw new Error("There are some problems due to project index mapping.");
}

Expand Down

0 comments on commit 014d764

Please sign in to comment.