Fixed submitted sponsors and prevented preview sponsors from being voted on

This commit is contained in:
Ajay Ramachandran
2020-04-04 23:35:44 -04:00
parent 55e17ceb60
commit f6945b56d8
3 changed files with 5 additions and 2 deletions

View File

@@ -1308,6 +1308,9 @@ function vote(type, UUID, skipNotice?: SkipNoticeComponent) {
let sponsorIndex = utils.getSponsorIndexFromUUID(sponsorTimes, UUID);
// Don't vote for preview sponsors
if (sponsorIndex == -1 || sponsorTimes[sponsorIndex].UUID === null) return;
// See if the local time saved count and skip count should be saved
if (type == 0 && sponsorSkipped[sponsorIndex] || type == 1 && !sponsorSkipped[sponsorIndex]) {
let factor = 1;