diff --git a/static/js/stream_edit.js b/static/js/stream_edit.js index 8ed07d1b5d..88a4047a20 100644 --- a/static/js/stream_edit.js +++ b/static/js/stream_edit.js @@ -400,7 +400,7 @@ function change_stream_privacy(e) { exports.change_stream_name = function (e) { e.preventDefault(); const sub_settings = $(e.target).closest('.subscription_settings'); - const stream_id = $(e.target).closest(".subscription_settings").attr("data-stream-id"); + const stream_id = get_stream_id(e.target); const new_name_box = sub_settings.find('.stream-name-editable'); const new_name = $.trim(new_name_box.text()); $(".stream_change_property_info").hide();