settings_org: Iterate over auth_methods with Object.entries.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg 2020-02-06 03:27:31 +00:00 committed by Tim Abbott
parent a9f5730270
commit 91d3d5d9df
1 changed files with 2 additions and 2 deletions

View File

@ -407,13 +407,13 @@ exports.populate_auth_methods = function (auth_methods) {
const auth_methods_table = $("#id_realm_authentication_methods").expectOne();
auth_methods = sort_object_by_key(auth_methods);
let rendered_auth_method_rows = "";
_.each(auth_methods, function (value, auth_method) {
for (const [auth_method, value] of Object.entries(auth_methods)) {
rendered_auth_method_rows += render_settings_admin_auth_methods_list({
method: auth_method,
enabled: value,
is_admin: page_params.is_admin,
});
});
}
auth_methods_table.html(rendered_auth_method_rows);
};