Fix console error when watching a video

pull/4218/head
Chocobozzz 2021-06-29 18:03:55 +02:00
parent 06a5557979
commit 4b8463dee3
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 1 additions and 4 deletions

View 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
}