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

Fix conditional formatting and add fallback

This commit is contained in:
Joshua M. Boniface 2023-05-30 10:39:27 -04:00
parent f1b0b504dd
commit 93d63330fd

View file

@ -67,10 +67,13 @@ function renderPackage(pkg, installedPlugins, page) {
$('#developer', page).text(pkg.owner); $('#developer', page).text(pkg.owner);
// This is a hack; the repository name and URL should be part of the global values // This is a hack; the repository name and URL should be part of the global values
// for the plugin, not each individual version. So we just use the top (latest) // for the plugin, not each individual version. So we just use the top (latest)
// version to get this information. // version to get this information. If it's missing (no versions), then say so.
if (pkg.versions.length) { if (pkg.versions.length) {
$('#repositoryName', page).text(pkg.versions[0].repositoryName); $('#repositoryName', page).text(pkg.versions[0].repositoryName);
$('#repositoryUrl', page).text(pkg.versions[0].repositoryUrl); $('#repositoryUrl', page).text(pkg.versions[0].repositoryUrl);
} else {
$('#repositoryName', page).text('Unknown (no versions)');
$('#repositoryUrl', page).text('Unknown (no versions)');
} }
if (installedPlugin) { if (installedPlugin) {