Fix stack overflow issue with unfinished preview segments

This commit is contained in:
Ajay Ramachandran
2021-11-07 16:09:01 -05:00
parent af547ce745
commit c38cc07e0a

View File

@@ -1154,6 +1154,7 @@ function getStartTimes(sponsorTimes: SponsorTime[], includeIntersectingSegments:
|| (includeIntersectingSegments && possibleTimes[i].scheduledTime < minimum && possibleTimes[i].segment[1] > minimum)))
&& (!onlySkippableSponsors || shouldSkip(possibleTimes[i]))
&& (!hideHiddenSponsors || possibleTimes[i].hidden === SponsorHideType.Visible)
&& possibleTimes[i].segment.length === 2
&& getCategoryActionType(possibleTimes[i].category) === CategoryActionType.Skippable) {
scheduledTimes.push(possibleTimes[i].scheduledTime);