Fix popup sometimes saying "No video found"

Fixes #2006
Fixes #2013
Fixes #1999
This commit is contained in:
Ajay 2024-04-30 20:54:54 -04:00
parent 5b845a56e1
commit 3be51c89a9

View file

@ -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()
});