mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	js: Convert _.map on jQuery collections to Array.from.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							7b0dea0351
						
					
				
				
					commit
					2f314a0854
				
			@@ -887,7 +887,7 @@ exports.warn_if_mentioning_unsubscribed_user = function (mentioned) {
 | 
			
		||||
        const error_area = $("#compose_invite_users");
 | 
			
		||||
        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');
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -169,13 +169,10 @@ function update_announce_stream_state() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function get_principals() {
 | 
			
		||||
    return _.map(
 | 
			
		||||
        $("#stream_creation_form input:checkbox[name=user]:checked"),
 | 
			
		||||
        function (elem) {
 | 
			
		||||
            const label = $(elem).closest('.add-user-label');
 | 
			
		||||
            return parseInt(label.attr('data-user-id'), 10);
 | 
			
		||||
        }
 | 
			
		||||
    );
 | 
			
		||||
    return Array.from($("#stream_creation_form input:checkbox[name=user]:checked"), elem => {
 | 
			
		||||
        const label = $(elem).closest(".add-user-label");
 | 
			
		||||
        return parseInt(label.attr("data-user-id"), 10);
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function create_stream() {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user