mirror of https://github.com/zulip/zulip.git
Don't try to test message visibility when it's not in the current stream.
Fixes the JS traceback "'null' is not an object" introduced in b67e52d. Testing: Receive a message when narrowed to a different subject, with the window focused. (imported from commit 54b9e7924a2bf66ba5cc9799fc3687a084496465)
This commit is contained in:
parent
49e3ba7cb3
commit
97b7b6ee33
|
@ -98,6 +98,8 @@ exports.message_is_visible = function (vp, message) {
|
|||
var height = vp.visible_height;
|
||||
|
||||
var row = rows.get(message.id, current_msg_list.table_name);
|
||||
if (row.length === 0) return false;
|
||||
|
||||
var row_offset = row.offset();
|
||||
var row_height = row.height();
|
||||
// Very tall messages are visible once we've gotten past them
|
||||
|
|
Loading…
Reference in New Issue