mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 11:37:02 +03:00
Fix unnecesary failure condition for chapter bar creation
This commit is contained in:
@@ -322,8 +322,7 @@ class PreviewBar {
|
||||
if (segments.every((segments) => segments.source === SponsorSourceType.YouTube)
|
||||
|| (!Config.config.renderSegmentsAsChapters
|
||||
&& segments.every((segment) => segment.actionType !== ActionType.Chapter
|
||||
|| segment.source === SponsorSourceType.YouTube))
|
||||
|| this.chapterGroups?.length <= 0) {
|
||||
|| segment.source === SponsorSourceType.YouTube))) {
|
||||
if (this.customChaptersBar) this.customChaptersBar.style.display = "none";
|
||||
this.originalChapterBar.style.removeProperty("display");
|
||||
return;
|
||||
@@ -349,6 +348,12 @@ class PreviewBar {
|
||||
this.chapterGroups = this.unfilteredChapterGroups;
|
||||
}
|
||||
|
||||
if (!this.chapterGroups || this.chapterGroups.length <= 0) {
|
||||
if (this.customChaptersBar) this.customChaptersBar.style.display = "none";
|
||||
this.originalChapterBar.style.removeProperty("display");
|
||||
return;
|
||||
}
|
||||
|
||||
// Create it from cloning
|
||||
let createFromScratch = false;
|
||||
if (!this.customChaptersBar || !this.progressBar.contains(this.customChaptersBar)) {
|
||||
|
||||
Reference in New Issue
Block a user