mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Optimize for loops
This commit is contained in:
parent
1b4bc83d24
commit
774aa45ae7
1 changed files with 2 additions and 6 deletions
|
@ -516,9 +516,7 @@ import Headroom from 'headroom.js';
|
|||
}
|
||||
|
||||
function hasUnsortedPlugins(pluginItems) {
|
||||
for (let i = 0, length = pluginItems.length; i < length; i++) {
|
||||
const pluginItem = pluginItems[i];
|
||||
|
||||
for (const pluginItem of pluginItems) {
|
||||
if (pluginItem.EnableInMainMenu && pluginItem.MenuSection === undefined) {
|
||||
return true;
|
||||
}
|
||||
|
@ -527,9 +525,7 @@ import Headroom from 'headroom.js';
|
|||
}
|
||||
|
||||
function addPluginPagesToMainMenu(links, pluginItems, section) {
|
||||
for (let i = 0, length = pluginItems.length; i < length; i++) {
|
||||
const pluginItem = pluginItems[i];
|
||||
|
||||
for (const pluginItem of pluginItems) {
|
||||
if (pluginItem.EnableInMainMenu && pluginItem.MenuSection === section) {
|
||||
links.push({
|
||||
name: pluginItem.DisplayName,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue