From: Go MAEDA Date: Thu, 3 Oct 2024 22:36:56 +0000 (+0000) Subject: Replace `for` loops with `forEach` in `buildFilterRow` function (#32523). X-Git-Tag: 6.0.0~100 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b135db09161047c7b18e2be5332e89eaa4f5ecc5;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@23102 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 8226f0f69..82adf53a8 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 = $('