Fix extension context lost errors

This commit is contained in:
Ajay
2025-03-08 04:05:29 -05:00
parent a4bb17f935
commit 169350a5bf

View File

@@ -2501,6 +2501,8 @@ function getSegmentsMessage(sponsorTimes: SponsorTime[]): string {
} }
function updateActiveSegment(currentTime: number): void { function updateActiveSegment(currentTime: number): void {
if (!chrome.runtime?.id) return;
previewBar?.updateChapterText(sponsorTimes, sponsorTimesSubmitting, currentTime); previewBar?.updateChapterText(sponsorTimes, sponsorTimesSubmitting, currentTime);
chrome.runtime.sendMessage({ chrome.runtime.sendMessage({