mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add eslint no-nested-ternary rule and fix violations
This commit is contained in:
parent
ab5fad6d5b
commit
d895a4fc6a
15 changed files with 89 additions and 30 deletions
|
@ -550,7 +550,13 @@ import template from './libraryoptionseditor.template.html';
|
|||
function getOrderedPlugins(plugins, configuredOrder) {
|
||||
plugins = plugins.slice(0);
|
||||
plugins.sort((a, b) => {
|
||||
return a = configuredOrder.indexOf(a.Name), b = configuredOrder.indexOf(b.Name), a < b ? -1 : a > b ? 1 : 0;
|
||||
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;
|
||||
});
|
||||
return plugins;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue