Apply ESLint autofix for no-yoda rule
This commit is contained in:
parent
642e2624e5
commit
22a46ecea6
49 changed files with 440 additions and 440 deletions
|
@ -309,7 +309,7 @@ define(['dom', 'layoutManager', 'inputManager', 'connectionManager', 'events', '
|
|||
}
|
||||
|
||||
function isUrlInCurrentView(url) {
|
||||
return -1 !== window.location.href.toString().toLowerCase().indexOf(url.toLowerCase());
|
||||
return window.location.href.toString().toLowerCase().indexOf(url.toLowerCase()) !== -1;
|
||||
}
|
||||
|
||||
function updateDashboardMenuSelectedItem() {
|
||||
|
@ -323,7 +323,7 @@ define(['dom', 'layoutManager', 'inputManager', 'connectionManager', 'events', '
|
|||
|
||||
if (pageIds) {
|
||||
pageIds = pageIds.split('|');
|
||||
selected = -1 != pageIds.indexOf(currentViewId);
|
||||
selected = pageIds.indexOf(currentViewId) != -1;
|
||||
}
|
||||
|
||||
var pageUrls = link.getAttribute('data-pageurls');
|
||||
|
@ -545,7 +545,7 @@ define(['dom', 'layoutManager', 'inputManager', 'connectionManager', 'events', '
|
|||
var view = items[i];
|
||||
list.push(view);
|
||||
|
||||
if ('livetv' == view.CollectionType) {
|
||||
if (view.CollectionType == 'livetv') {
|
||||
view.ImageTags = {};
|
||||
view.icon = 'live_tv';
|
||||
var guideView = Object.assign({}, view);
|
||||
|
@ -671,15 +671,15 @@ define(['dom', 'layoutManager', 'inputManager', 'connectionManager', 'events', '
|
|||
var lnkMediaFolder = elems[i];
|
||||
var itemId = lnkMediaFolder.getAttribute('data-itemid');
|
||||
|
||||
if (isChannelsPage && 'channels' === itemId) {
|
||||
if (isChannelsPage && itemId === 'channels') {
|
||||
lnkMediaFolder.classList.add('navMenuOption-selected');
|
||||
} else if (isLiveTvPage && 'livetv' === itemId) {
|
||||
} else if (isLiveTvPage && itemId === 'livetv') {
|
||||
lnkMediaFolder.classList.add('navMenuOption-selected');
|
||||
} else if (isEditorPage && 'editor' === itemId) {
|
||||
} else if (isEditorPage && itemId === 'editor') {
|
||||
lnkMediaFolder.classList.add('navMenuOption-selected');
|
||||
} else if (isMySyncPage && 'manageoffline' === itemId && -1 != window.location.href.toString().indexOf('mode=download')) {
|
||||
} else if (isMySyncPage && itemId === 'manageoffline' && window.location.href.toString().indexOf('mode=download') != -1) {
|
||||
lnkMediaFolder.classList.add('navMenuOption-selected');
|
||||
} else if (isMySyncPage && 'syncotherdevices' === itemId && -1 == window.location.href.toString().indexOf('mode=download')) {
|
||||
} else if (isMySyncPage && itemId === 'syncotherdevices' && window.location.href.toString().indexOf('mode=download') == -1) {
|
||||
lnkMediaFolder.classList.add('navMenuOption-selected');
|
||||
} else if (id && itemId == id) {
|
||||
lnkMediaFolder.classList.add('navMenuOption-selected');
|
||||
|
@ -753,7 +753,7 @@ define(['dom', 'layoutManager', 'inputManager', 'connectionManager', 'events', '
|
|||
}
|
||||
|
||||
if (headerBackButton) {
|
||||
if ('false' !== page.getAttribute('data-backbutton') && appRouter.canGoBack()) {
|
||||
if (page.getAttribute('data-backbutton') !== 'false' && appRouter.canGoBack()) {
|
||||
headerBackButton.classList.remove('hide');
|
||||
} else {
|
||||
headerBackButton.classList.add('hide');
|
||||
|
@ -863,11 +863,11 @@ define(['dom', 'layoutManager', 'inputManager', 'connectionManager', 'events', '
|
|||
document.title = 'Jellyfin';
|
||||
},
|
||||
setTitle: function (title) {
|
||||
if (null == title) {
|
||||
if (title == null) {
|
||||
return void LibraryMenu.setDefaultTitle();
|
||||
}
|
||||
|
||||
if ('-' === title) {
|
||||
if (title === '-') {
|
||||
title = '';
|
||||
}
|
||||
|
||||
|
@ -922,7 +922,7 @@ define(['dom', 'layoutManager', 'inputManager', 'connectionManager', 'events', '
|
|||
}
|
||||
}
|
||||
|
||||
if ('library' !== currentDrawerType) {
|
||||
if (currentDrawerType !== 'library') {
|
||||
refreshLibraryDrawer();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue