added check to make sure that votes are not empty#95
Merged
tallen42 merged 4 commits intoComputerScienceHouse:devfrom Mar 14, 2026
Merged
added check to make sure that votes are not empty#95tallen42 merged 4 commits intoComputerScienceHouse:devfrom
tallen42 merged 4 commits intoComputerScienceHouse:devfrom
Conversation
tallen42
requested changes
Mar 13, 2026
Contributor
tallen42
left a comment
There was a problem hiding this comment.
This is a nitpick, sorry, but could you move the check to the top of the function so that way it will return before trying all of the other vote-casting logic?
Author
|
Moved it! I also noticed a lot of duplicate code and a duplicate check, let me know if there's anything else I should change |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This PR contains a commit that adds an if block to prevent empty vote submissions.
Why
Fixes #90
A prevention method against losing your vote.
Test Plan
I tested it with my if statement commented out and with it included, and it works!
I checked a few edge cases with write-ins as well
Env Vars
No changes
Checklist