From 3774ef975659ccc4ee90adf7af3291646fc8c5ba Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Wed, 1 Sep 2021 19:50:58 -0400 Subject: [PATCH] Fix preview sometimes not skipping Fixes #915 --- src/content.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/content.ts b/src/content.ts index 64cc1c1f..a963d4bd 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1090,7 +1090,8 @@ function skipToTime({v, skipTime, skippingSegments, openNotice, forceAutoSkip, u // There will only be one submission if it is manual skip const autoSkip: boolean = forceAutoSkip || shouldAutoSkip(skippingSegments[0]); - if ((autoSkip || sponsorTimesSubmitting.includes(skippingSegments[0])) && v.currentTime !== skipTime[1]) { + if ((autoSkip || sponsorTimesSubmitting.some((time) => time.segment === skippingSegments[0].segment)) + && v.currentTime !== skipTime[1]) { // Fix for looped videos not working when skipping to the end #426 // for some reason you also can't skip to 1 second before the end if (v.loop && v.duration > 1 && skipTime[1] >= v.duration - 1) {