Don't use video before it is set

This commit is contained in:
Ajay
2022-09-03 00:36:28 -04:00
parent 5b136f2da8
commit f8c61b7848

View File

@@ -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