From 169350a5bfb18dfc8109a44fc564d83ce5d96a49 Mon Sep 17 00:00:00 2001 From: Ajay Date: Sat, 8 Mar 2025 04:05:29 -0500 Subject: [PATCH] Fix extension context lost errors --- src/content.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/content.ts b/src/content.ts index e1251957..2deb403e 100644 --- a/src/content.ts +++ b/src/content.ts @@ -2501,6 +2501,8 @@ function getSegmentsMessage(sponsorTimes: SponsorTime[]): string { } function updateActiveSegment(currentTime: number): void { + if (!chrome.runtime?.id) return; + previewBar?.updateChapterText(sponsorTimes, sponsorTimesSubmitting, currentTime); chrome.runtime.sendMessage({