mirror of
https://github.com/zulip/zulip.git
synced 2025-11-08 16:01:58 +00:00
Don't throw an exception if someone edits a very old message
Previously, if you didn't have a message that someone else had edited in your message list, you would get an exception because we weren't checking whether we actually had the message or not. (imported from commit 33a5c6e7fe95b5397a32df5c7b5f6714d71e1e5f)
This commit is contained in:
@@ -719,6 +719,10 @@ function maybe_add_narrowed_messages(messages, msg_list) {
|
||||
function update_messages(events) {
|
||||
$.each(events, function (idx, event) {
|
||||
var msg = all_msg_list.get(event.message_id);
|
||||
if (msg === undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.rendered_content !== undefined) {
|
||||
msg.content = event.rendered_content;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user