mirror of https://github.com/zulip/zulip.git
js: Convert _.map on jQuery collections to Array.from.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
parent
7b0dea0351
commit
2f314a0854
|
@ -887,7 +887,7 @@ exports.warn_if_mentioning_unsubscribed_user = function (mentioned) {
|
||||||
const error_area = $("#compose_invite_users");
|
const error_area = $("#compose_invite_users");
|
||||||
const existing_invites_area = $('#compose_invite_users .compose_invite_user');
|
const existing_invites_area = $('#compose_invite_users .compose_invite_user');
|
||||||
|
|
||||||
const existing_invites = _.map($(existing_invites_area), function (user_row) {
|
const existing_invites = Array.from($(existing_invites_area), user_row => {
|
||||||
return $(user_row).data('useremail');
|
return $(user_row).data('useremail');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -169,13 +169,10 @@ function update_announce_stream_state() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_principals() {
|
function get_principals() {
|
||||||
return _.map(
|
return Array.from($("#stream_creation_form input:checkbox[name=user]:checked"), elem => {
|
||||||
$("#stream_creation_form input:checkbox[name=user]:checked"),
|
const label = $(elem).closest(".add-user-label");
|
||||||
function (elem) {
|
return parseInt(label.attr("data-user-id"), 10);
|
||||||
const label = $(elem).closest('.add-user-label');
|
});
|
||||||
return parseInt(label.attr('data-user-id'), 10);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function create_stream() {
|
function create_stream() {
|
||||||
|
|
Loading…
Reference in New Issue