mirror of https://github.com/zulip/zulip.git
Guard against incorrect use of compose.set_mode
(imported from commit 294441f2b9107ce2488866764c3d30c35133a14a)
This commit is contained in:
parent
1047bf49b4
commit
c25d1ea8e7
|
@ -153,6 +153,9 @@ exports.clear = function () {
|
|||
// Set the mode of a compose already in progress.
|
||||
// Does not clear the input fields.
|
||||
exports.set_mode = function (mode) {
|
||||
if (!is_composing_message)
|
||||
return;
|
||||
|
||||
if (mode === 'private') {
|
||||
show('private', $("#private_message_recipient"));
|
||||
is_composing_message = "private";
|
||||
|
|
Loading…
Reference in New Issue