aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/content.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/content.ts')
-rw-r--r--src/content.ts4
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()
});