Skip to content

Commit c3cbc44

Browse files
committed
Fix hiding segments not working on videos with YouTube chapters
Fixes #2194
1 parent 6965279 commit c3cbc44

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/utils.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ export default class Utils {
199199

200200
getSponsorIndexFromUUID(sponsorTimes: SponsorTime[], UUID: string): number {
201201
for (let i = 0; i < sponsorTimes.length; i++) {
202-
if (sponsorTimes[i].UUID.startsWith(UUID) || UUID.startsWith(sponsorTimes[i].UUID)) {
202+
if (sponsorTimes[i].UUID && (sponsorTimes[i].UUID.startsWith(UUID) || UUID.startsWith(sponsorTimes[i].UUID))) {
203203
return i;
204204
}
205205
}
@@ -320,6 +320,7 @@ export default class Utils {
320320

321321
allDownvotes[hashedVideoID] = currentVideoData;
322322
}
323+
console.log(allDownvotes)
323324

324325
const entries = Object.entries(allDownvotes);
325326
if (entries.length > 10000) {

0 commit comments

Comments
 (0)