Skip to content

added check to make sure that votes are not empty - #95

Merged
tallen42 merged 4 commits into
ComputerScienceHouse:devfrom
Luminic:fix-empty-vote
Mar 14, 2026
Merged

tallen42 merged 4 commits into
ComputerScienceHouse:devfrom
Luminic:fix-empty-vote

Conversation

@Luminic

@Luminic Luminic commented Mar 11, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Tested all changes locally

@tallen42 tallen42 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@Luminic

Luminic commented Mar 13, 2026

Copy link
Copy Markdown
Contributor 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

@Luminic
Luminic requested a review from tallen42 March 13, 2026 22:01

@tallen42 tallen42 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great!

@tallen42
tallen42 merged commit 8705fe9 into ComputerScienceHouse:dev Mar 14, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants