mirror of
https://github.com/zulip/zulip.git
synced 2025-11-08 07:52:19 +00:00
Fix JS error syncing starred out-of-view messages.
Previously, if one starred very old messages (or ones in a stream you're not subscribed to), your other open browsers would likely throw an exception syncing the message flag.
This commit is contained in:
@@ -210,6 +210,11 @@ exports.update_starred = function (message_id, starred) {
|
|||||||
// lists.
|
// lists.
|
||||||
var message = exports.find_message(message_id);
|
var message = exports.find_message(message_id);
|
||||||
|
|
||||||
|
// If it isn't cached in the browser, no need to do anything
|
||||||
|
if (message === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
unread.mark_message_as_read(message);
|
unread.mark_message_as_read(message);
|
||||||
|
|
||||||
message.starred = starred;
|
message.starred = starred;
|
||||||
|
|||||||
Reference in New Issue
Block a user