mirror of https://github.com/zulip/zulip.git
submessage: Move submessages === undefined check up.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
parent
4fa1075840
commit
b5bf677717
|
@ -88,6 +88,10 @@ exports.update_message = function (submsg) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (message.submessages === undefined) {
|
||||
message.submessages = [];
|
||||
}
|
||||
|
||||
const existing = _.find(message.submessages, function (sm) {
|
||||
return sm.id === submsg.id;
|
||||
});
|
||||
|
@ -97,10 +101,6 @@ exports.update_message = function (submsg) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (message.submessages === undefined) {
|
||||
message.submessages = [];
|
||||
}
|
||||
|
||||
message.submessages.push(submsg);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue