settings: Fix bug when changing stream specific notification setting.

The class for "tr" element was changed in c22de76af7, 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.
This commit is contained in:
Sahil Batra 2023-01-02 23:23:33 +05:30 committed by Tim Abbott
parent 62562eedf7
commit 2378d62da1
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ export function get_display_text_for_realm_message_retention_setting() {
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);
}