mirror of
https://github.com/zulip/zulip.git
synced 2025-11-20 22:48:16 +00:00
eslint: Fix @typescript-eslint/prefer-optional-chain.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
8396c14cdc
commit
cd1ced82d6
@@ -1199,7 +1199,7 @@ function process_hotkey(e: JQuery.KeyDownEvent, hotkey: Hotkey): boolean {
|
||||
case "toggle_topic_visibility_policy":
|
||||
if (recent_view_ui.is_in_focus()) {
|
||||
const recent_msg = recent_view_ui.get_focused_row_message();
|
||||
if (recent_msg !== undefined && recent_msg.type === "stream") {
|
||||
if (recent_msg?.type === "stream") {
|
||||
user_topics_ui.toggle_topic_visibility_policy(recent_msg);
|
||||
return true;
|
||||
}
|
||||
@@ -1217,13 +1217,13 @@ function process_hotkey(e: JQuery.KeyDownEvent, hotkey: Hotkey): boolean {
|
||||
case "list_of_channel_topics":
|
||||
if (recent_view_ui.is_in_focus()) {
|
||||
const msg = recent_view_ui.get_focused_row_message();
|
||||
if (msg !== undefined && msg.type === "stream") {
|
||||
if (msg?.type === "stream") {
|
||||
list_of_channel_topics_channel_id = msg.stream_id;
|
||||
}
|
||||
}
|
||||
if (inbox_ui.is_in_focus()) {
|
||||
const msg = inbox_ui.get_focused_row_message();
|
||||
if (msg !== undefined && msg.msg_type === "stream") {
|
||||
if (msg?.msg_type === "stream") {
|
||||
list_of_channel_topics_channel_id = msg.stream_id;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user