diff --git a/src/content.ts b/src/content.ts index 12719fe5..85ee317f 100644 --- a/src/content.ts +++ b/src/content.ts @@ -531,7 +531,7 @@ function cancelSponsorSchedule(): void { /** * @param currentTime Optional if you don't want to use the actual current time */ -function startSponsorSchedule(includeIntersectingSegments = false, currentTime?: number, includeNonIntersectingSegments = true): void { +async function startSponsorSchedule(includeIntersectingSegments = false, currentTime?: number, includeNonIntersectingSegments = true): Promise { cancelSponsorSchedule(); // Don't skip if advert playing and reset last checked time @@ -545,7 +545,7 @@ function startSponsorSchedule(includeIntersectingSegments = false, currentTime?: } // Give up if video changed, and trigger a videoID change if so - if (checkIfNewVideoID()) { + if (await checkIfNewVideoID()) { return; }