mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix issue with version sort
This commit is contained in:
parent
4f4fff717f
commit
3489d716b2
1 changed files with 5 additions and 1 deletions
|
@ -22,6 +22,10 @@ function populateHistory(packageInfo, page) {
|
|||
function populateVersions(packageInfo, page, installedPlugin) {
|
||||
let html = '';
|
||||
|
||||
packageInfo.versions.sort((a, b) => {
|
||||
return b.timestamp < a.timestamp ? 1 : -1;
|
||||
});
|
||||
|
||||
for (let i = 0; i < packageInfo.versions.length; i++) {
|
||||
const version = packageInfo.versions[i];
|
||||
html += '<option value="' + version.version + '">' + globalize.translate('PluginFromRepo', version.version, version.repositoryName) + '</option>';
|
||||
|
@ -33,7 +37,7 @@ function populateVersions(packageInfo, page, installedPlugin) {
|
|||
$('#pCurrentVersion', page).hide().html('');
|
||||
}
|
||||
|
||||
const packageVersion = packageInfo.versions.sort().pop();
|
||||
const packageVersion = packageInfo.versions.pop();
|
||||
if (packageVersion) {
|
||||
selectmenu.val(packageVersion.version);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue