1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Replace existence check with optional chaining (#5742)

This commit is contained in:
Peter Santos 2024-08-17 02:58:01 -04:00 committed by GitHub
parent cc22fbc042
commit 1da9b548ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 21 additions and 21 deletions

View file

@ -737,12 +737,12 @@ export default function () {
}
});
context.querySelector('.btnAudioTracks').addEventListener('click', function (e) {
if (currentPlayer && lastPlayerState && lastPlayerState.NowPlayingItem) {
if (currentPlayer && lastPlayerState?.NowPlayingItem) {
showAudioMenu(context, currentPlayer, e.target);
}
});
context.querySelector('.btnSubtitles').addEventListener('click', function (e) {
if (currentPlayer && lastPlayerState && lastPlayerState.NowPlayingItem) {
if (currentPlayer && lastPlayerState?.NowPlayingItem) {
showSubtitleMenu(context, currentPlayer, e.target);
}
});