diff options
author | Ajay <[email protected]> | 2022-10-14 18:23:40 -0400 |
---|---|---|
committer | Ajay <[email protected]> | 2022-10-14 18:23:40 -0400 |
commit | 4bd7e9ab3433426364c5102949d3fed6659aef93 (patch) | |
tree | 3e35af10db19c29e97d472d0c9171ed353a94839 | |
parent | 97fc8174b9df72d7e2c87b97b72de9e053b7356c (diff) | |
download | SponsorBlock-4bd7e9ab3433426364c5102949d3fed6659aef93.tar.gz SponsorBlock-4bd7e9ab3433426364c5102949d3fed6659aef93.zip |
Fix progress bar with 0px chapters
-rw-r--r-- | src/js-components/previewBar.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/js-components/previewBar.ts b/src/js-components/previewBar.ts index 84ebb155..34c9a820 100644 --- a/src/js-components/previewBar.ts +++ b/src/js-components/previewBar.ts @@ -676,7 +676,7 @@ class PreviewBar { for (let i = 0; i < sections.length; i++) { const section = sections[i] 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 + this.getPartialChapterSectionStyle(section, "marginRight"); |