mirror of
https://github.com/zulip/zulip.git
synced 2025-10-29 19:13:53 +00:00
eslint: Fix unicorn/no-for-loop.
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-for-loop.md Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
73a14bee6f
commit
de791b82b6
@@ -215,15 +215,7 @@ function get_profile_field_info(id) {
|
||||
}
|
||||
|
||||
function get_profile_field(id) {
|
||||
const all_custom_fields = page_params.custom_profile_fields;
|
||||
let field;
|
||||
for (let i = 0; i < all_custom_fields.length; i += 1) {
|
||||
if (all_custom_fields[i].id === id) {
|
||||
field = all_custom_fields[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
return field;
|
||||
return page_params.custom_profile_fields.find((field) => field.id === id);
|
||||
}
|
||||
|
||||
exports.parse_field_choices_from_field_data = function (field_data) {
|
||||
|
||||
Reference in New Issue
Block a user