aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/js-components/previewBar.ts
diff options
context:
space:
mode:
authorAjay <[email protected]>2022-09-23 11:04:55 -0400
committerAjay <[email protected]>2022-09-23 11:04:55 -0400
commite1688c3f58db33e50b102b42c8aa39eb7feefa66 (patch)
treecf869d022eb58d25ca1c523d0ceb7a927213b8db /src/js-components/previewBar.ts
parente11a320c3fc72c6cd3c4288f269dc6f23210e8f9 (diff)
downloadSponsorBlock-e1688c3f58db33e50b102b42c8aa39eb7feefa66.tar.gz
SponsorBlock-e1688c3f58db33e50b102b42c8aa39eb7feefa66.zip
reset custom chapters bar to null when deleting
Diffstat (limited to 'src/js-components/previewBar.ts')
-rw-r--r--src/js-components/previewBar.ts2
1 files changed, 1 insertions, 1 deletions
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;
}