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
|
@ -793,7 +793,12 @@ import { getParameterByName } from '../utils/url.ts';
|
|||
}
|
||||
|
||||
function updateMenuForPageType(isDashboardPage, isLibraryPage) {
|
||||
const newPageType = isDashboardPage ? 2 : isLibraryPage ? 1 : 3;
|
||||
let newPageType = 3;
|
||||
if (isDashboardPage) {
|
||||
newPageType = 2;
|
||||
} else if (isLibraryPage) {
|
||||
newPageType = 1;
|
||||
}
|
||||
|
||||
if (currentPageType !== newPageType) {
|
||||
currentPageType = newPageType;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue