From d2be34d5aa01676a3e7909294430daf1ff2a2d82 Mon Sep 17 00:00:00 2001 From: Sahil Batra Date: Mon, 2 Jan 2023 23:23:33 +0530 Subject: [PATCH] settings: Fix bug when changing stream specific notification setting. The class for "tr" element was changed in c22de76af7a891, so get_stream_id function was not able to get the correct stream-id from the target element. This commit fixes get_stream_edit function to also check for closest ".stream-notifications-row" ancestor element and thus it returns the correct stream id. --- static/js/stream_edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/stream_edit.js b/static/js/stream_edit.js index 9d1e2e2a65..27da5fc040 100644 --- a/static/js/stream_edit.js +++ b/static/js/stream_edit.js @@ -118,7 +118,7 @@ function set_stream_message_retention_setting_dropdown(stream) { function get_stream_id(target) { const $row = $(target).closest( - ".stream-row, .stream_settings_header, .subscription_settings, .save-button", + ".stream-row, .stream-notifications-row, .stream_settings_header, .subscription_settings, .save-button", ); return Number.parseInt($row.attr("data-stream-id"), 10); }