mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix prefer for-of errors
This commit is contained in:
parent
ef719c45f4
commit
1b03cd79eb
11 changed files with 26 additions and 47 deletions
|
@ -28,8 +28,7 @@ function populateVersions(packageInfo, page, installedPlugin) {
|
|||
return b.timestamp < a.timestamp ? -1 : 1;
|
||||
});
|
||||
|
||||
for (let i = 0; i < packageInfo.versions.length; i++) {
|
||||
const version = packageInfo.versions[i];
|
||||
for (const version of packageInfo.versions) {
|
||||
html += '<option value="' + version.version + '">' + globalize.translate('PluginFromRepo', version.version, version.repositoryName) + '</option>';
|
||||
}
|
||||
|
||||
|
|
|
@ -66,8 +66,7 @@ function populateList(options) {
|
|||
let currentCategory = null;
|
||||
let html = '';
|
||||
|
||||
for (let i = 0; i < availablePlugins.length; i++) {
|
||||
const plugin = availablePlugins[i];
|
||||
for (const plugin of availablePlugins) {
|
||||
const category = plugin.categoryDisplayName;
|
||||
if (category != currentCategory) {
|
||||
if (currentCategory) {
|
||||
|
|
|
@ -133,8 +133,7 @@ function updateTaskButton(elem, state) {
|
|||
|
||||
export default function(view) {
|
||||
function updateTasks(tasks) {
|
||||
for (let i = 0; i < tasks.length; i++) {
|
||||
const task = tasks[i];
|
||||
for (const task of tasks) {
|
||||
view.querySelector('#taskProgress' + task.Id).innerHTML = getTaskProgressHtml(task);
|
||||
updateTaskButton(view.querySelector('#btnTask' + task.Id), task.State);
|
||||
}
|
||||
|
|
|
@ -135,9 +135,7 @@ function showManualForm(context, showCancel, focusPassword) {
|
|||
function loadUserList(context, apiClient, users) {
|
||||
let html = '';
|
||||
|
||||
for (let i = 0; i < users.length; i++) {
|
||||
const user = users[i];
|
||||
|
||||
for (const user of users) {
|
||||
// TODO move card creation code to Card component
|
||||
let cssClass = 'card squareCard scalableCard squareCard-scalable';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue