diff --git a/packages/interface/src/features/ballot/components/SubmitBallotButton.tsx b/packages/interface/src/features/ballot/components/SubmitBallotButton.tsx index aff8d5d..aac7389 100644 --- a/packages/interface/src/features/ballot/components/SubmitBallotButton.tsx +++ b/packages/interface/src/features/ballot/components/SubmitBallotButton.tsx @@ -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."); }