From e1688c3f58db33e50b102b42c8aa39eb7feefa66 Mon Sep 17 00:00:00 2001 From: Ajay Date: Fri, 23 Sep 2022 11:04:55 -0400 Subject: [PATCH] reset custom chapters bar to null when deleting --- src/js-components/previewBar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js-components/previewBar.ts b/src/js-components/previewBar.ts index 959864c8..922b6b2a 100644 --- a/src/js-components/previewBar.ts +++ b/src/js-components/previewBar.ts @@ -314,11 +314,11 @@ class PreviewBar { createChaptersBar(segments: PreviewBarSegment[]): void { if (!this.progressBar || !this.originalChapterBar || this.originalChapterBar.childElementCount <= 0) { - if (this.customChaptersBar) this.customChaptersBar.style.display = "none"; if (this.originalChapterBar) this.originalChapterBar.style.removeProperty("display"); // Make sure other video types lose their chapter bar document.querySelectorAll(".sponsorBlockChapterBar").forEach((element) => element.remove()); + this.customChaptersBar = null; return; }