From 4b8463dee32f2b7c460aa3a8d74dfcf5de160acf Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 29 Jun 2021 18:03:55 +0200 Subject: Fix console error when watching a video --- client/src/assets/player/videojs-components/settings-menu-button.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'client/src/assets/player/videojs-components') 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 } -- cgit v1.2.3