diff --git a/static/js/message_list_view.js b/static/js/message_list_view.js index 68ebcf6476..bf4dba9ff0 100644 --- a/static/js/message_list_view.js +++ b/static/js/message_list_view.js @@ -48,7 +48,7 @@ function get_user_group_id_for_mention_button(elem) { const user_group_id = $(elem).attr('data-user-group-id'); if (user_group_id) { - return user_group_id; + return parseInt(user_group_id, 10); } return; diff --git a/static/js/settings_user_groups.js b/static/js/settings_user_groups.js index b03e59625e..2895916ba0 100644 --- a/static/js/settings_user_groups.js +++ b/static/js/settings_user_groups.js @@ -298,7 +298,7 @@ exports.set_up = function () { }); $('#user-groups').on('click', '.delete', function () { - const group_id = $(this).parents('.user-group').attr('id'); + const group_id = parseInt($(this).parents('.user-group').attr('id'), 10); if (!exports.can_edit(group_id)) { return; }