Fix progress bar with 0px chapters

This commit is contained in:
Ajay
2022-10-14 18:23:40 -04:00
parent 97fc8174b9
commit 4bd7e9ab34

View File

@@ -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");