From: Go MAEDA Date: Mon, 9 Sep 2024 14:31:23 +0000 (+0000) Subject: Replace `for` loops with `forEach` in `buildFilterRow` function (#32523). X-Git-Tag: 6.0.0~148 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=053326b660184a7273c43799f4b01237fe6293b2;p=redmine.git Replace `for` loops with `forEach` in `buildFilterRow` function (#32523). Patch by Yuichi HARADA (user:yui.har). git-svn-id: https://svn.redmine.org/redmine/trunk@23046 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 4560bff09..d0b601285 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -185,7 +185,7 @@ function buildFilterRow(field, operator, values) { if (!filterOptions) return; var operators = operatorByType[filterOptions['type']]; var filterValues = filterOptions['values']; - var i, select; + var select; var tr = $('
').attr('id', 'tr_'+fieldId).html( '
' + @@ -195,11 +195,11 @@ function buildFilterRow(field, operator, values) { filterTable.append(tr); select = tr.find('.operator select'); - for (i = 0; i < operators.length; i++) { - var option = $('