From 3be51c89a9bf8c086172f8bb5a8efa83d0193523 Mon Sep 17 00:00:00 2001 From: Ajay Date: Tue, 30 Apr 2024 20:54:54 -0400 Subject: Fix popup sometimes saying "No video found" Fixes #2006 Fixes #2013 Fixes #1999 --- src/content.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content.ts b/src/content.ts index f67ba684..5a9569ca 100644 --- a/src/content.ts +++ b/src/content.ts @@ -219,7 +219,7 @@ function messageListener(request: Message, sender: unknown, sendResponse: (respo found: sponsorDataFound, status: lastResponseStatus, sponsorTimes: sponsorTimes, - time: getVideo().currentTime, + time: getVideo()?.currentTime ?? 0, onMobileYouTube: isOnMobileYouTube() }); @@ -1183,7 +1183,7 @@ async function sponsorsLookup(keepOldSubmissions = true) { found: sponsorDataFound, status: lastResponseStatus, sponsorTimes: sponsorTimes, - time: getVideo().currentTime, + time: getVideo()?.currentTime ?? 0, onMobileYouTube: isOnMobileYouTube() }); -- cgit v1.2.3