lightbox: Don't blow up for messages not in the message store.

This should somewhat reduce the gravity of the failure mode for cases
where the message the user clicked cannot be found (which would be a
significant bug on its own merit in any case).
This commit is contained in:
Chris Heald
2020-02-10 10:00:00 -07:00
committed by Tim Abbott
parent fb09bd5df6
commit 86faebc2e5

View File

@@ -138,8 +138,9 @@ exports.open = function (image, options) {
const message = message_store.get(zid);
if (message === undefined) {
blueslip.error("Lightbox for unknown message " + $message.attr("zid"));
} else {
sender_full_name = message.sender_full_name;
}
sender_full_name = message.sender_full_name;
}
payload = {
user: sender_full_name,