mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 13:07:05 +03:00
Fix progress bar with 0px chapters
This commit is contained in:
@@ -676,7 +676,7 @@ class PreviewBar {
|
|||||||
for (let i = 0; i < sections.length; i++) {
|
for (let i = 0; i < sections.length; i++) {
|
||||||
const section = sections[i] as HTMLElement;
|
const section = sections[i] as HTMLElement;
|
||||||
const checkElement = section.querySelector(selector) as HTMLElement;
|
const checkElement = section.querySelector(selector) as HTMLElement;
|
||||||
const currentSectionWidthNoMargin = this.getPartialChapterSectionStyle(section, "width") || progressBar.clientWidth;
|
const currentSectionWidthNoMargin = this.getPartialChapterSectionStyle(section, "width") ?? progressBar.clientWidth;
|
||||||
const currentSectionWidth = currentSectionWidthNoMargin
|
const currentSectionWidth = currentSectionWidthNoMargin
|
||||||
+ this.getPartialChapterSectionStyle(section, "marginRight");
|
+ this.getPartialChapterSectionStyle(section, "marginRight");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user