mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
small fixes to cleanup no-nested-ternary
This commit is contained in:
parent
d895a4fc6a
commit
f58d7b0beb
3 changed files with 10 additions and 12 deletions
|
@ -550,13 +550,9 @@ import template from './libraryoptionseditor.template.html';
|
|||
function getOrderedPlugins(plugins, configuredOrder) {
|
||||
plugins = plugins.slice(0);
|
||||
plugins.sort((a, b) => {
|
||||
let order = 0;
|
||||
if (a < b) {
|
||||
order = -1;
|
||||
} else if (a > b) {
|
||||
order = 1;
|
||||
}
|
||||
return a = configuredOrder.indexOf(a.Name), b = configuredOrder.indexOf(b.Name), order;
|
||||
a = configuredOrder.indexOf(a.Name);
|
||||
b = configuredOrder.indexOf(b.Name);
|
||||
return a - b;
|
||||
});
|
||||
return plugins;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue