diff --git a/src/js-components/previewBar.ts b/src/js-components/previewBar.ts index ca17e2eb..4f397399 100644 --- a/src/js-components/previewBar.ts +++ b/src/js-components/previewBar.ts @@ -209,23 +209,17 @@ class PreviewBar { bar.style.position = "absolute"; const duration = segment[1] - segment[0]; - if (segment[1] - segment[0] > 0) bar.style.width = `calc(${this.timeToPercentage(segment[1] - segment[0])}${this.chapterFilter(barSegment) ? '- 2px' : ''})`; + if (segment[1] - segment[0] > 0) bar.style.width = `calc(${this.timeToPercentage(segment[1] - segment[0])}${this.chapterFilter(barSegment) ? ' - 2px' : ''})`; bar.style.left = this.timeToPercentage(Math.min(this.videoDuration - Math.max(0, duration), segment[0])); return bar; } createChaptersBar(segments: PreviewBarSegment[]): void { - //