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
|
@ -64,7 +64,7 @@ function getMediaSourceHtml(user, item, version) {
|
|||
if (version.Formats?.length) {
|
||||
html += `${createAttribute(globalize.translate('MediaInfoFormat'), version.Formats.join(','))}<br/>`;
|
||||
}
|
||||
if (version.Path && user && user.Policy.IsAdministrator) {
|
||||
if (version.Path && user?.Policy.IsAdministrator) {
|
||||
html += `${createAttribute(globalize.translate('MediaInfoPath'), version.Path, true)}<br/>`;
|
||||
}
|
||||
if (version.Size) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue