Skip to content

Commit

Permalink
Fix hiding segments not working on videos with YouTube chapters
Browse files Browse the repository at this point in the history
Fixes #2194
  • Loading branch information
ajayyy committed Jan 23, 2025
1 parent 6965279 commit c3cbc44
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export default class Utils {

getSponsorIndexFromUUID(sponsorTimes: SponsorTime[], UUID: string): number {
for (let i = 0; i < sponsorTimes.length; i++) {
if (sponsorTimes[i].UUID.startsWith(UUID) || UUID.startsWith(sponsorTimes[i].UUID)) {
if (sponsorTimes[i].UUID && (sponsorTimes[i].UUID.startsWith(UUID) || UUID.startsWith(sponsorTimes[i].UUID))) {
return i;
}
}
Expand Down Expand Up @@ -320,6 +320,7 @@ export default class Utils {

allDownvotes[hashedVideoID] = currentVideoData;
}
console.log(allDownvotes)

const entries = Object.entries(allDownvotes);
if (entries.length > 10000) {
Expand Down

0 comments on commit c3cbc44

Please sign in to comment.