mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
hotkey: Fix wrong assumption of message_lists.current is defined.
Since we are checking `is_in_focus()` of recent and inbox view, message_lists.current can be not defined here, also addition a new view in Zulip will make this fail.
This commit is contained in:
@@ -1207,9 +1207,9 @@ function process_hotkey(e: JQuery.KeyDownEvent, hotkey: Hotkey): boolean {
|
||||
if (inbox_ui.is_in_focus()) {
|
||||
return inbox_ui.toggle_topic_visibility_policy();
|
||||
}
|
||||
if (message_lists.current!.selected_message()) {
|
||||
if (message_lists.current?.selected_message()) {
|
||||
user_topics_ui.toggle_topic_visibility_policy(
|
||||
message_lists.current!.selected_message()!,
|
||||
message_lists.current.selected_message()!,
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user