From 4b8463dee32f2b7c460aa3a8d74dfcf5de160acf Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 29 Jun 2021 18:03:55 +0200 Subject: [PATCH] Fix console error when watching a video --- .../assets/player/videojs-components/settings-menu-button.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/client/src/assets/player/videojs-components/settings-menu-button.ts b/client/src/assets/player/videojs-components/settings-menu-button.ts index 74788a897..339420a89 100644 --- a/client/src/assets/player/videojs-components/settings-menu-button.ts +++ b/client/src/assets/player/videojs-components/settings-menu-button.ts @@ -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 }