]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix console error when watching a video
authorChocobozzz <me@florianbigard.com>
Tue, 29 Jun 2021 16:03:55 +0000 (18:03 +0200)
committerChocobozzz <me@florianbigard.com>
Tue, 29 Jun 2021 16:03:55 +0000 (18:03 +0200)
client/src/assets/player/videojs-components/settings-menu-button.ts

index 74788a8971bdf1855c72a1acad03da82a64c6d86..339420a899bc52cc7366bcf883da9765a5b3b9e2 100644 (file)
@@ -64,10 +64,7 @@ class SettingsButton extends Button {
   onDocumentClick (event: MouseEvent) {
     const element = event.target as HTMLElement
 
-    if (
-      element && element.classList &&
-      (element.classList.contains('vjs-settings') || element.parentElement.classList.contains('vjs-settings'))
-    ) {
+    if (element?.classList?.contains('vjs-settings') || element?.parentElement?.classList?.contains('vjs-settings')) {
       return
     }