mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
compose_reply: Fix msg_type being not defined triggering errors.
When focused on filters, `r` keypress to open compose had `msg_type` set to undefined which shouldn't be the case ever as we always expect msg_type to be defined when compose is open.
This commit is contained in:
@@ -32,7 +32,9 @@ export function respond_to_message(opts) {
|
||||
} else if (inbox_util.is_visible()) {
|
||||
const message_opts = inbox_ui.get_focused_row_message();
|
||||
if (message_opts.message === undefined) {
|
||||
compose_actions.start(message_opts.msg_type, {
|
||||
// If the user is not focused on inbox header, msg_type
|
||||
// is not defined, so we open empty compose with nothing prefilled.
|
||||
compose_actions.start(message_opts.msg_type ?? "stream", {
|
||||
trigger: "inbox_nofocus",
|
||||
...message_opts,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user