From f8c61b78483bcd629113cb2651fdb1d4b71222e6 Mon Sep 17 00:00:00 2001 From: Ajay Date: Sat, 3 Sep 2022 00:36:28 -0400 Subject: [PATCH] Don't use video before it is set --- src/content.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content.ts b/src/content.ts index 40ea6705..e143aa28 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1287,7 +1287,7 @@ function updatePreviewBar(): void { }); previewBar.set(previewBarSegments.filter((segment) => segment.actionType !== ActionType.Full), video?.duration) - updateActiveSegment(video.currentTime); + if (video) updateActiveSegment(video.currentTime); if (Config.config.showTimeWithSkips) { const skippedDuration = utils.getTimestampsDuration(previewBarSegments