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

Check for pkg.versions.length

Co-authored-by: Niels van Velzen <nielsvanvelzen@users.noreply.github.com>
This commit is contained in:
Joshua M. Boniface 2023-05-30 10:35:46 -04:00 committed by GitHub
parent 919be18c84
commit f1b0b504dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,8 +68,10 @@ function renderPackage(pkg, installedPlugins, page) {
// 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)
// version to get this information.
if (pkg.versions.length) {
$('#repositoryName', page).text(pkg.versions[0].repositoryName);
$('#repositoryUrl', page).text(pkg.versions[0].repositoryUrl);
}
if (installedPlugin) {
const currentVersionText = globalize.translate('MessageYouHaveVersionInstalled', '<strong>' + installedPlugin.Version + '</strong>');