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:
parent
cc22fbc042
commit
1da9b548ac
10 changed files with 21 additions and 21 deletions
|
@ -316,7 +316,7 @@ export function getCommands(options) {
|
|||
}
|
||||
// Show Album Artist by default, as a song can have multiple artists, which specific one would this option refer to?
|
||||
// Although some albums can have multiple artists, it's not as common as songs.
|
||||
if (options.openArtist !== false && item.AlbumArtists && item.AlbumArtists.length) {
|
||||
if (options.openArtist !== false && item.AlbumArtists?.length) {
|
||||
commands.push({
|
||||
name: globalize.translate('ViewAlbumArtist'),
|
||||
id: 'artist',
|
||||
|
@ -609,7 +609,7 @@ function play(item, resume, queue, queueNext) {
|
|||
}
|
||||
|
||||
let startPosition = 0;
|
||||
if (resume && item.UserData && item.UserData.PlaybackPositionTicks) {
|
||||
if (resume && item.UserData?.PlaybackPositionTicks) {
|
||||
startPosition = item.UserData.PlaybackPositionTicks;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue