inbox_ui: Fix buggy mark as read for empty string topic.

Earlier, marking empty string topic as read via Inbox UI
resulted in marking the stream as read.

This commit fixes the bug.
This commit is contained in:
Prakhar Pratyush
2025-02-18 17:18:07 +05:30
committed by Tim Abbott
parent dc95699862
commit 3d2fa9f788

View File

@@ -1602,7 +1602,7 @@ export function initialize(): void {
}
const stream_id = Number($elt.attr("data-stream-id"));
const topic = $elt.attr("data-topic-name");
if (topic) {
if (topic !== undefined) {
unread_ops.mark_topic_as_read(stream_id, topic);
} else {
unread_ops.mark_stream_as_read(stream_id);