Skip to content

Commit 4bd7e9a

Browse files
committed
Fix progress bar with 0px chapters
1 parent 97fc817 commit 4bd7e9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js-components/previewBar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ class PreviewBar {
676676
for (let i = 0; i < sections.length; i++) {
677677
const section = sections[i] as HTMLElement;
678678
const checkElement = section.querySelector(selector) as HTMLElement;
679-
const currentSectionWidthNoMargin = this.getPartialChapterSectionStyle(section, "width") || progressBar.clientWidth;
679+
const currentSectionWidthNoMargin = this.getPartialChapterSectionStyle(section, "width") ?? progressBar.clientWidth;
680680
const currentSectionWidth = currentSectionWidthNoMargin
681681
+ this.getPartialChapterSectionStyle(section, "marginRight");
682682

0 commit comments

Comments
 (0)