mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
settings_profile_fields: Iterate over field_data with Object.entries.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
committed by
Tim Abbott
parent
dd10108c24
commit
f912572887
@@ -215,13 +215,13 @@ function get_profile_field(id) {
|
||||
|
||||
exports.parse_field_choices_from_field_data = function (field_data) {
|
||||
const choices = [];
|
||||
_.each(field_data, function (choice, value) {
|
||||
for (const [value, choice] of Object.entries(field_data)) {
|
||||
choices.push({
|
||||
value: value,
|
||||
text: choice.text,
|
||||
order: choice.order,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
return choices;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user