diff options
author | Ajay <[email protected]> | 2024-04-30 20:54:54 -0400 |
---|---|---|
committer | Ajay <[email protected]> | 2024-04-30 20:54:54 -0400 |
commit | 3be51c89a9bf8c086172f8bb5a8efa83d0193523 (patch) | |
tree | 75a192225834b96bd2231e8856c4a8cdb5748e49 /src | |
parent | 5b845a56e10e9878025a28e4d85d7e5c53b4817d (diff) | |
download | SponsorBlock-3be51c89a9bf8c086172f8bb5a8efa83d0193523.tar.gz SponsorBlock-3be51c89a9bf8c086172f8bb5a8efa83d0193523.zip |
Fix popup sometimes saying "No video found"
Fixes #2006
Fixes #2013
Fixes #1999
Diffstat (limited to 'src')
-rw-r--r-- | src/content.ts | 4 |
1 files 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() }); |