mirror of https://github.com/zulip/zulip.git
lightbox: Add debugging code for unknown message IDs.
This should help debug a traceback we've been seeing in production where the fetched message was undefined.
This commit is contained in:
parent
78a4924ecc
commit
195b96c989
|
@ -116,9 +116,12 @@ exports.open = function (image, options) {
|
|||
$type = "image";
|
||||
$source = $image.attr("src");
|
||||
}
|
||||
|
||||
var message = message_store.get($message.attr("zid"));
|
||||
if (message === undefined) {
|
||||
blueslip.error("Lightbox for unknown message " + $message.attr("zid"));
|
||||
}
|
||||
payload = {
|
||||
user: message_store.get($message.attr("zid")).sender_full_name,
|
||||
user: message.sender_full_name,
|
||||
title: $image.parent().attr("title"),
|
||||
type: $type,
|
||||
preview: $image.attr("src"),
|
||||
|
|
Loading…
Reference in New Issue