Changed similar sponsor check to check if equal as well.

This commit is contained in:
Ajay Ramachandran 2019-10-23 20:15:47 -04:00
parent 0404dfd53f
commit 9cdf0596c0

View file

@ -698,8 +698,8 @@ function getVoteOrganisedSponsorTimes(sponsorTimes, votes, UUIDs) {
for (let i = 0; i < sponsorTimes.length; i++) {
//see if the start time is located between the start and end time of the other sponsor time.
for (let j = 0; j < sponsorTimes.length; j++) {
if (sponsorTimes[j][0] > sponsorTimes[i][0] && sponsorTimes[j][0] < sponsorTimes[i][1]) {
for (let j = i + 1; j < sponsorTimes.length; j++) {
if (sponsorTimes[j][0] >= sponsorTimes[i][0] && sponsorTimes[j][0] <= sponsorTimes[i][1]) {
//sponsor j is contained in sponsor i
similarSponsors.push([i, j]);
}