From f29f1299aa956bb6a9c0634fe9f0f372a739473e Mon Sep 17 00:00:00 2001 From: evykassirer Date: Fri, 8 Nov 2024 13:09:47 -0800 Subject: [PATCH] stream_list: Use more specific classname for click handler. This avoids this code being fragile with any future refactoring. --- web/src/stream_list.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/stream_list.ts b/web/src/stream_list.ts index 7a0035632d..be7357960f 100644 --- a/web/src/stream_list.ts +++ b/web/src/stream_list.ts @@ -860,7 +860,7 @@ export function set_event_handlers({ e.preventDefault(); e.stopPropagation(); - const stream_id = stream_id_for_elt($(e.target).parents("li")); + const stream_id = stream_id_for_elt($(e.target).parents("li.narrow-filter")); const current_narrow_stream_id = narrow_state.stream_id(); const current_topic = narrow_state.topic();