File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -740,7 +740,7 @@ class PreviewBar {
740740 || ( ( ! segments || segments . length <= 0 ) && submittingSegments ?. length <= 0 ) ) {
741741 const chaptersContainer = this . getChaptersContainer ( ) ;
742742 const chapterButton = this . getChapterButton ( chaptersContainer ) ;
743- if ( chapterButton . classList . contains ( "ytp-chapter-container-disabled" ) ) {
743+ if ( chapterButton && chapterButton . classList . contains ( "ytp-chapter-container-disabled" ) ) {
744744 chaptersContainer . style . display = "none" ;
745745 }
746746
@@ -820,7 +820,7 @@ class PreviewBar {
820820
821821 private getChapterButton ( chaptersContainer : HTMLElement ) : HTMLButtonElement {
822822 return ( chaptersContainer ?? this . getChaptersContainer ( ) )
823- . querySelector ( "button.ytp-chapter-title" ) as HTMLButtonElement ;
823+ ? .querySelector ( "button.ytp-chapter-title" ) as HTMLButtonElement ;
824824 }
825825
826826 remove ( ) : void {
You can’t perform that action at this time.
0 commit comments