1
0
Fork 0

Fix console error when watching a video

This commit is contained in:
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

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
}