This commit is contained in:
Ajay Ramachandran 2020-10-27 19:07:48 -04:00 committed by GitHub
parent 06fa6eb874
commit 009a489d3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -198,7 +198,7 @@ function categoryVote(UUID, userID, isVIP, category, hashedIP, res) {
//TODO: In the future, raise this number from zero to make it harder to change categories
// VIPs change it every time
if (nextCategoryCount - currentCategoryCount >= (submissionInfo ? Math.max(Math.ciel(submissionInfo.votes / 2), 1) : 1) || isVIP) {
if (nextCategoryCount - currentCategoryCount >= (submissionInfo ? Math.max(Math.ceil(submissionInfo.votes / 2), 1) : 1) || isVIP) {
// Replace the category
db.prepare('run', "update sponsorTimes set category = ? where UUID = ?", [category, UUID]);
}